X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b70362998b8f562923f6ed6708f06537ac056cd4..659863d8a73d02626f4060bb1099fe7bfd80d22a:/src/msw/app.cpp diff --git a/src/msw/app.cpp b/src/msw/app.cpp index 59b929c7ce..549a8d77da 100644 --- a/src/msw/app.cpp +++ b/src/msw/app.cpp @@ -52,6 +52,7 @@ #include "wx/msw/private.h" #include "wx/msw/ole/oleutils.h" +#include "wx/msw/private/timer.h" #if wxUSE_TOOLTIPS #include "wx/tooltip.h" @@ -77,10 +78,7 @@ #include #include -// For MB_TASKMODAL -#ifdef __WXWINCE__ -#include "wx/msw/wince/missing.h" -#endif +#include "wx/msw/missing.h" // instead of including which is not part of the core SDK and not // shipped at all with other compilers, we always define the parts of it we @@ -234,20 +232,14 @@ DWORD wxGUIAppTraits::WaitForThread(WXHANDLE hThread) if ( !wxEventLoop::GetActive() ) return DoSimpleWaitForThread(hThread); - const DWORD wakeMask = - QS_ALLINPUT // return as soon as there are any events -#if !defined(__WXWINCE__) - | QS_ALLPOSTMESSAGE -#endif - ; - return ::MsgWaitForMultipleObjects ( 1, // number of objects to wait for (HANDLE *)&hThread, // the objects false, // wait for any objects, not all INFINITE, // no timeout - wakeMask + QS_ALLINPUT | // return as soon as there are any events + QS_ALLPOSTMESSAGE ); } @@ -274,6 +266,16 @@ wxPortId wxGUIAppTraits::GetToolkitVersion(int *majVer, int *minVer) const #endif } +wxTimerImpl *wxGUIAppTraits::CreateTimerImpl(wxTimer *timer) +{ + return new wxMSWTimerImpl(timer); +} + +wxEventLoop* wxGUIAppTraits::CreateEventLoop() +{ + return new wxEventLoop; +} + // =========================================================================== // wxApp implementation // =========================================================================== @@ -778,30 +780,3 @@ terminate the program,\r\n\ } #endif // wxUSE_EXCEPTIONS - -// ---------------------------------------------------------------------------- -// deprecated event loop functions -// ---------------------------------------------------------------------------- - -#if WXWIN_COMPATIBILITY_2_4 - -void wxApp::DoMessage(WXMSG *pMsg) -{ - wxEventLoop *evtLoop = wxEventLoop::GetActive(); - if ( evtLoop ) - evtLoop->ProcessMessage(pMsg); -} - -bool wxApp::DoMessage() -{ - wxEventLoop *evtLoop = wxEventLoop::GetActive(); - return evtLoop ? evtLoop->Dispatch() : false; -} - -bool wxApp::ProcessMessage(WXMSG* pMsg) -{ - wxEventLoop *evtLoop = wxEventLoop::GetActive(); - return evtLoop && evtLoop->PreProcessMessage(pMsg); -} - -#endif // WXWIN_COMPATIBILITY_2_4