From abd694417a84479d6e994f088ac2e1d76327dae0 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 24 May 2009 19:39:40 +0000 Subject: [PATCH] remove wxMSW-specific (but copied into wxPalm too) wxAppTraits::AlwaysYield(), it's useless now that wxEventLoop is in wxBase git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60734 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/msw/apptbase.h | 3 --- include/wx/msw/apptrait.h | 2 -- include/wx/palmos/apptbase.h | 3 --- include/wx/palmos/apptrait.h | 2 -- src/msw/app.cpp | 5 ----- src/msw/basemsw.cpp | 15 --------------- src/palmos/app.cpp | 5 ----- src/palmos/base.cpp | 4 ---- 8 files changed, 39 deletions(-) diff --git a/include/wx/msw/apptbase.h b/include/wx/msw/apptbase.h index 6aba6b4ae3..45251e74a3 100644 --- a/include/wx/msw/apptbase.h +++ b/include/wx/msw/apptbase.h @@ -26,9 +26,6 @@ public: // some opaque data which will be passed later to AfterChildWaitLoop() virtual void *BeforeChildWaitLoop() = 0; - // process pending Windows messages, even in console app - virtual void AlwaysYield() = 0; - // called after starting to wait for the child termination, the parameter // is the return value of BeforeChildWaitLoop() virtual void AfterChildWaitLoop(void *data) = 0; diff --git a/include/wx/msw/apptrait.h b/include/wx/msw/apptrait.h index 0c8f8ea2bf..418356b169 100644 --- a/include/wx/msw/apptrait.h +++ b/include/wx/msw/apptrait.h @@ -21,7 +21,6 @@ class WXDLLIMPEXP_BASE wxConsoleAppTraits : public wxConsoleAppTraitsBase public: virtual wxEventLoopBase *CreateEventLoop(); virtual void *BeforeChildWaitLoop(); - virtual void AlwaysYield(); virtual void AfterChildWaitLoop(void *data); #if wxUSE_TIMER virtual wxTimerImpl *CreateTimerImpl(wxTimer *timer); @@ -41,7 +40,6 @@ class WXDLLIMPEXP_CORE wxGUIAppTraits : public wxGUIAppTraitsBase public: virtual wxEventLoopBase *CreateEventLoop(); virtual void *BeforeChildWaitLoop(); - virtual void AlwaysYield(); virtual void AfterChildWaitLoop(void *data); #if wxUSE_TIMER virtual wxTimerImpl *CreateTimerImpl(wxTimer *timer); diff --git a/include/wx/palmos/apptbase.h b/include/wx/palmos/apptbase.h index b86e9cf3d4..07a8253cd8 100644 --- a/include/wx/palmos/apptbase.h +++ b/include/wx/palmos/apptbase.h @@ -26,9 +26,6 @@ public: // some opaque data which will be passed later to AfterChildWaitLoop() virtual void *BeforeChildWaitLoop() = 0; - // process pending Windows messages, even in console app - virtual void AlwaysYield() = 0; - // called after starting to wait for the child termination, the parameter // is the return value of BeforeChildWaitLoop() virtual void AfterChildWaitLoop(void *data) = 0; diff --git a/include/wx/palmos/apptrait.h b/include/wx/palmos/apptrait.h index f8eef8d389..311514fe3c 100644 --- a/include/wx/palmos/apptrait.h +++ b/include/wx/palmos/apptrait.h @@ -27,7 +27,6 @@ public: virtual wxEventLoopBase *CreateEventLoop(); #endif // wxUSE_CONSOLE_EVENTLOOP virtual void *BeforeChildWaitLoop(); - virtual void AlwaysYield(); virtual void AfterChildWaitLoop(void *data); #if wxUSE_TIMER virtual wxTimerImpl *CreateTimerImpl(wxTimer *timer) { return new wxPalmOSTimerImpl(timer); } @@ -43,7 +42,6 @@ class WXDLLIMPEXP_CORE wxGUIAppTraits : public wxGUIAppTraitsBase public: virtual wxEventLoopBase *CreateEventLoop(); virtual void *BeforeChildWaitLoop(); - virtual void AlwaysYield(); virtual void AfterChildWaitLoop(void *data); #if wxUSE_TIMER // there is no wxTimer support yet diff --git a/src/msw/app.cpp b/src/msw/app.cpp index 50df7cdeff..a4f6edfec4 100644 --- a/src/msw/app.cpp +++ b/src/msw/app.cpp @@ -200,11 +200,6 @@ void *wxGUIAppTraits::BeforeChildWaitLoop() return new ChildWaitLoopData(wd, winActive); } -void wxGUIAppTraits::AlwaysYield() -{ - wxYield(); -} - void wxGUIAppTraits::AfterChildWaitLoop(void *dataOrig) { wxEndBusyCursor(); diff --git a/src/msw/basemsw.cpp b/src/msw/basemsw.cpp index 51d1c26618..4981322259 100644 --- a/src/msw/basemsw.cpp +++ b/src/msw/basemsw.cpp @@ -52,21 +52,6 @@ WXDWORD wxAppTraits::DoSimpleWaitForThread(WXHANDLE hThread) // wxConsoleAppTraits implementation // ============================================================================ -void wxConsoleAppTraits::AlwaysYield() -{ - // we need to use special logic to deal with WM_PAINT: as this pseudo - // message is generated automatically as long as there are invalidated - // windows belonging to this thread, we'd never return if we waited here - // until we have no more of them left. OTOH, this message is always the - // last one in the queue, so we can safely return as soon as we detect it - MSG msg; - while ( ::PeekMessage(&msg, NULL, 0, 0, PM_REMOVE) ) - { - if ( msg.message == WM_PAINT ) - break; - } -} - void *wxConsoleAppTraits::BeforeChildWaitLoop() { // nothing to do here diff --git a/src/palmos/app.cpp b/src/palmos/app.cpp index 8b98b53d7e..9c09f2336f 100644 --- a/src/palmos/app.cpp +++ b/src/palmos/app.cpp @@ -100,11 +100,6 @@ void *wxGUIAppTraits::BeforeChildWaitLoop() return NULL; } -void wxGUIAppTraits::AlwaysYield() -{ - wxYield(); -} - void wxGUIAppTraits::AfterChildWaitLoop(void *dataOrig) { } diff --git a/src/palmos/base.cpp b/src/palmos/base.cpp index cadd56b368..d25c40f061 100644 --- a/src/palmos/base.cpp +++ b/src/palmos/base.cpp @@ -35,10 +35,6 @@ // wxConsoleAppTraits implementation // ============================================================================ -void wxConsoleAppTraits::AlwaysYield() -{ -} - void *wxConsoleAppTraits::BeforeChildWaitLoop() { return NULL; -- 2.47.2