From 8d40c05f411b794cce6bddb835be30d7ba4d643a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 3 Jul 2013 00:24:34 +0000 Subject: [PATCH] Add "OSX" prefix to wxCFEventLoop::DoRun() and DoStop() methods. Just rename these methods to avoid clashes with DoRun() that will be added to the base class soon, no real changes. This is done in preparation for improving nested event loops support, see #10258. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74331 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/osx/carbon/evtloop.h | 5 ++--- include/wx/osx/cocoa/evtloop.h | 5 ++--- include/wx/osx/core/evtloop.h | 5 ++--- include/wx/osx/evtloop.h | 5 ++--- src/osx/carbon/evtloop.cpp | 8 ++++---- src/osx/cocoa/evtloop.mm | 10 +++++----- src/osx/core/evtloop_cf.cpp | 8 ++++---- src/osx/iphone/evtloop.mm | 12 ++++++------ 8 files changed, 27 insertions(+), 31 deletions(-) diff --git a/include/wx/osx/carbon/evtloop.h b/include/wx/osx/carbon/evtloop.h index 8a80fef3fa..555930319e 100644 --- a/include/wx/osx/carbon/evtloop.h +++ b/include/wx/osx/carbon/evtloop.h @@ -25,9 +25,8 @@ public: protected: virtual int DoDispatchTimeout(unsigned long timeout); - virtual void DoRun(); - - virtual void DoStop(); + virtual void OSXDoRun(); + virtual void OSXDoStop(); virtual CFRunLoopRef CFGetCurrentRunLoop() const; }; diff --git a/include/wx/osx/cocoa/evtloop.h b/include/wx/osx/cocoa/evtloop.h index 8ccf5b22ba..c388d32ce6 100644 --- a/include/wx/osx/cocoa/evtloop.h +++ b/include/wx/osx/cocoa/evtloop.h @@ -29,9 +29,8 @@ public: protected: virtual int DoDispatchTimeout(unsigned long timeout); - virtual void DoRun(); - - virtual void DoStop(); + virtual void OSXDoRun(); + virtual void OSXDoStop(); virtual CFRunLoopRef CFGetCurrentRunLoop() const; diff --git a/include/wx/osx/core/evtloop.h b/include/wx/osx/core/evtloop.h index c5bb71b643..a59a785a0e 100644 --- a/include/wx/osx/core/evtloop.h +++ b/include/wx/osx/core/evtloop.h @@ -77,9 +77,8 @@ protected: virtual int DoDispatchTimeout(unsigned long timeout); - virtual void DoRun(); - - virtual void DoStop(); + virtual void OSXDoRun(); + virtual void OSXDoStop(); // should we exit the loop? bool m_shouldExit; diff --git a/include/wx/osx/evtloop.h b/include/wx/osx/evtloop.h index a26f03372f..48b952e650 100644 --- a/include/wx/osx/evtloop.h +++ b/include/wx/osx/evtloop.h @@ -30,9 +30,8 @@ public: wxModalEventLoop(WXWindow modalNativeWindow); protected: - virtual void DoRun(); - - virtual void DoStop(); + virtual void OSXDoRun(); + virtual void OSXDoStop(); // (in case) the modal window for this event loop wxNonOwnedWindow* m_modalWindow; diff --git a/src/osx/carbon/evtloop.cpp b/src/osx/carbon/evtloop.cpp index d263effec7..d064a8dbd1 100644 --- a/src/osx/carbon/evtloop.cpp +++ b/src/osx/carbon/evtloop.cpp @@ -93,13 +93,13 @@ void wxGUIEventLoop::WakeUp() kEventPriorityHigh ); } -void wxGUIEventLoop::DoRun() +void wxGUIEventLoop::OSXDoRun() { wxMacAutoreleasePool autoreleasepool; RunApplicationEventLoop(); } -void wxGUIEventLoop::DoStop() +void wxGUIEventLoop::OSXDoStop() { QuitApplicationEventLoop(); } @@ -127,7 +127,7 @@ wxModalEventLoop::wxModalEventLoop(WXWindow modalNativeWindow) // END move into a evtloop_osx.cpp -void wxModalEventLoop::DoRun() +void wxModalEventLoop::OSXDoRun() { wxWindowDisabler disabler(m_modalWindow); wxMacAutoreleasePool autoreleasepool; @@ -163,7 +163,7 @@ void wxModalEventLoop::DoRun() } -void wxModalEventLoop::DoStop() +void wxModalEventLoop::OSXDoStop() { wxMacAutoreleasePool autoreleasepool; QuitAppModalLoopForWindow(m_modalNativeWindow); diff --git a/src/osx/cocoa/evtloop.mm b/src/osx/cocoa/evtloop.mm index 135f936de5..00a3008dbc 100644 --- a/src/osx/cocoa/evtloop.mm +++ b/src/osx/cocoa/evtloop.mm @@ -240,13 +240,13 @@ int wxGUIEventLoop::DoDispatchTimeout(unsigned long timeout) } } -void wxGUIEventLoop::DoRun() +void wxGUIEventLoop::OSXDoRun() { wxMacAutoreleasePool autoreleasepool; [NSApp run]; } -void wxGUIEventLoop::DoStop() +void wxGUIEventLoop::OSXDoStop() { // only calling stop: is not enough when called from a runloop-observer, // therefore add a dummy event, to make sure the runloop gets another round @@ -305,7 +305,7 @@ wxModalEventLoop::wxModalEventLoop(WXWindow modalNativeWindow) // END move into a evtloop_osx.cpp -void wxModalEventLoop::DoRun() +void wxModalEventLoop::OSXDoRun() { wxMacAutoreleasePool pool; @@ -324,7 +324,7 @@ void wxModalEventLoop::DoRun() [NSApp runModalForWindow:m_modalNativeWindow]; } -void wxModalEventLoop::DoStop() +void wxModalEventLoop::OSXDoStop() { [NSApp abortModal]; } @@ -460,4 +460,4 @@ wxWindowDisabler::~wxWindowDisabler() } delete m_winDisabled; -} \ No newline at end of file +} diff --git a/src/osx/core/evtloop_cf.cpp b/src/osx/core/evtloop_cf.cpp index 7fb81172b2..66178cccb7 100644 --- a/src/osx/core/evtloop_cf.cpp +++ b/src/osx/core/evtloop_cf.cpp @@ -364,7 +364,7 @@ int wxCFEventLoop::DoDispatchTimeout(unsigned long timeout) return 1; } -void wxCFEventLoop::DoRun() +void wxCFEventLoop::OSXDoRun() { for ( ;; ) { @@ -385,7 +385,7 @@ void wxCFEventLoop::DoRun() } } -void wxCFEventLoop::DoStop() +void wxCFEventLoop::OSXDoStop() { CFRunLoopStop(CFGetCurrentRunLoop()); } @@ -414,7 +414,7 @@ int wxCFEventLoop::Run() { #endif // wxUSE_EXCEPTIONS - DoRun(); + OSXDoRun(); #if wxUSE_EXCEPTIONS // exit the outer loop as well @@ -452,7 +452,7 @@ void wxCFEventLoop::Exit(int rc) { m_exitcode = rc; m_shouldExit = true; - DoStop(); + OSXDoStop(); } wxCFEventLoopPauseIdleEvents::wxCFEventLoopPauseIdleEvents() diff --git a/src/osx/iphone/evtloop.mm b/src/osx/iphone/evtloop.mm index 8986ef5fa3..4e806515c5 100644 --- a/src/osx/iphone/evtloop.mm +++ b/src/osx/iphone/evtloop.mm @@ -83,7 +83,7 @@ wxGUIEventLoop::wxGUIEventLoop() { } -void wxGUIEventLoop::DoRun() +void wxGUIEventLoop::OSXDoRun() { if ( IsMain() ) { @@ -93,7 +93,7 @@ void wxGUIEventLoop::DoRun() } else { - wxCFEventLoop::DoRun(); + wxCFEventLoop::OSXDoRun(); } } @@ -102,9 +102,9 @@ int wxGUIEventLoop::DoDispatchTimeout(unsigned long timeout) return wxCFEventLoop::DoDispatchTimeout(timeout); } -void wxGUIEventLoop::DoStop() +void wxGUIEventLoop::OSXDoStop() { - return wxCFEventLoop::DoStop(); + return wxCFEventLoop::OSXDoStop(); } CFRunLoopRef wxGUIEventLoop::CFGetCurrentRunLoop() const @@ -136,12 +136,12 @@ wxModalEventLoop::wxModalEventLoop(WXWindow modalNativeWindow) // END move into a evtloop_osx.cpp -void wxModalEventLoop::DoRun() +void wxModalEventLoop::OSXDoRun() { // presentModalViewController:animated: } -void wxModalEventLoop::DoStop() +void wxModalEventLoop::OSXDoStop() { // (void)dismissModalViewControllerAnimated:(BOOL)animated }