X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dcda1c71b1d08e0cb1e8d3a16abc36a3d85996cc..c0ab6adfedf92aa4457821422e77c19b80f10bee:/include/wx/thread.h diff --git a/include/wx/thread.h b/include/wx/thread.h index 2140c3f777..6775fdf760 100644 --- a/include/wx/thread.h +++ b/include/wx/thread.h @@ -137,6 +137,9 @@ private: #if defined(__WXMSW__) || defined(__WXPM__) class WXDLLEXPORT wxCriticalSectionInternal; #define WXCRITICAL_INLINE +#elif defined(__WXMAC__) + class WXDLLEXPORT wxCriticalSectionInternal; + #define WXCRITICAL_INLINE #else // !MSW && !PM #define WXCRITICAL_INLINE inline #endif // MSW/!MSW @@ -160,7 +163,7 @@ private: wxCriticalSection(const wxCriticalSection&); wxCriticalSection& operator=(const wxCriticalSection&); -#if defined(__WXMSW__) || defined(__WXPM__) +#if defined(__WXMSW__) || defined(__WXPM__) || defined(__WXMAC__) wxCriticalSectionInternal *m_critsect; #else // !MSW wxMutex m_mutex; @@ -396,6 +399,18 @@ public: // wakes up the main thread if it's sleeping inside ::GetMessage() extern void WXDLLEXPORT wxWakeUpMainThread(); + // return TRUE if the main thread is waiting for some other to terminate: + // wxApp then should block all "dangerous" messages + extern bool WXDLLEXPORT wxIsWaitingForThread(); +#elif defined(__WXMAC__) + extern void WXDLLEXPORT wxMutexGuiLeaveOrEnter(); + + // returns TRUE if the main thread has GUI lock + extern bool WXDLLEXPORT wxGuiOwnedByMainThread(); + + // wakes up the main thread if it's sleeping inside ::GetMessage() + extern void WXDLLEXPORT wxWakeUpMainThread(); + // return TRUE if the main thread is waiting for some other to terminate: // wxApp then should block all "dangerous" messages extern bool WXDLLEXPORT wxIsWaitingForThread();