git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74612
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
virtual bool OSXOnShouldTerminate();
// before application terminates
virtual void OSXOnWillTerminate();
virtual bool OSXOnShouldTerminate();
// before application terminates
virtual void OSXOnWillTerminate();
+
+private:
+ bool m_onInitResult;
+
+public:
+
#endif
// Hide the application windows the same as the system hide command would do it.
#endif
// Hide the application windows the same as the system hide command would do it.
{
wxEventLoopBaseTiedPtr mainLoop(&m_mainLoop, CreateMainLoop());
{
wxEventLoopBaseTiedPtr mainLoop(&m_mainLoop, CreateMainLoop());
-#if defined(__WXOSX__) && wxOSX_USE_COCOA_OR_IPHONE
- // OnLaunched called from native app controller
-#else
if (wxTheApp)
wxTheApp->OnLaunched();
if (wxTheApp)
wxTheApp->OnLaunched();
return m_mainLoop ? m_mainLoop->Run() : -1;
}
return m_mainLoop ? m_mainLoop->Run() : -1;
}
#if wxOSX_USE_COCOA_OR_IPHONE
void wxApp::OSXOnWillFinishLaunching()
{
#if wxOSX_USE_COCOA_OR_IPHONE
void wxApp::OSXOnWillFinishLaunching()
{
+ m_onInitResult = OnInit();
}
void wxApp::OSXOnDidFinishLaunching()
{
}
void wxApp::OSXOnDidFinishLaunching()
{
- wxTheApp->OnLaunched();
- wxEventLoopBase::SetActive(GetMainLoop());
}
void wxApp::OSXOnWillTerminate()
}
void wxApp::OSXOnWillTerminate()
wxCloseEvent event;
event.SetCanVeto(false);
wxTheApp->OnEndSession(event);
wxCloseEvent event;
event.SetCanVeto(false);
wxTheApp->OnEndSession(event);
-
- wxGUIEventLoop* mainloop = dynamic_cast<wxGUIEventLoop*>(GetMainLoop());
- if ( mainloop )
- mainloop->OSXOnWillTerminate();
- wxEventLoopBase::SetActive(NULL);
-
- wxTheApp->OnExit();
}
bool wxApp::OSXOnShouldTerminate()
}
bool wxApp::OSXOnShouldTerminate()
-#if wxOSX_USE_COCOA_OR_CARBON
bool wxApp::CallOnInit()
{
wxMacAutoreleasePool autoreleasepool;
bool wxApp::CallOnInit()
{
wxMacAutoreleasePool autoreleasepool;