// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
-// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
}
}
+#if wxOSX_USE_COCOA_OR_IPHONE
void wxApp::OSXOnWillFinishLaunching()
{
+ wxTheApp->OnInit();
}
void wxApp::OSXOnDidFinishLaunching()
{
+ wxTheApp->OnLaunched();
+ wxEventLoopBase::SetActive(GetMainLoop());
}
+void wxApp::OSXOnWillTerminate()
+{
+ 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()
+{
+ wxCloseEvent event;
+ wxTheApp->OnQueryEndSession(event);
+ return !event.GetVeto();
+}
+#endif
+
//----------------------------------------------------------------------
// Macintosh CommandID support - converting between native and wx IDs
//----------------------------------------------------------------------