From ba0337764de25e3c32bcb0aae387723e02c6dfea Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sun, 30 Mar 2014 11:46:59 +0000 Subject: [PATCH] adding empty base class implementation for OnNextIteration, call from OSXDoRun, allowing console event loop to override git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76223 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/osx/core/evtloop.h | 4 ++++ src/osx/core/evtloop_cf.cpp | 2 ++ 2 files changed, 6 insertions(+) diff --git a/include/wx/osx/core/evtloop.h b/include/wx/osx/core/evtloop.h index 2b002e087d..fc8c76d095 100644 --- a/include/wx/osx/core/evtloop.h +++ b/include/wx/osx/core/evtloop.h @@ -55,6 +55,10 @@ protected: // terminating when Exit() is called virtual int DoRun(); + // may be overridden to perform some action at the start of each new event + // loop iteration + virtual void OnNextIteration() {} + virtual void DoYieldFor(long eventsToProcess); void CommonModeObserverCallBack(CFRunLoopObserverRef observer, int activity); diff --git a/src/osx/core/evtloop_cf.cpp b/src/osx/core/evtloop_cf.cpp index de0bf39074..f24744c95c 100644 --- a/src/osx/core/evtloop_cf.cpp +++ b/src/osx/core/evtloop_cf.cpp @@ -272,6 +272,8 @@ void wxCFEventLoop::OSXDoRun() { for ( ;; ) { + OnNextIteration(); + // generate and process idle events for as long as we don't // have anything else to do DoProcessEvents();