// Author: Vadim Zeitlin, Stefan Csomor
// Modified by:
// Created: 2006-01-12
-// RCS-ID: $Id: evtloop.cpp 54845 2008-07-30 14:52:41Z SC $
+// RCS-ID: $Id$
// Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#include "wx/log.h"
+#if wxUSE_GUI
+ #include "wx/nonownedwnd.h"
+#endif
+
#include "wx/osx/private.h"
// ============================================================================
}
*/
-@interface wxAppDelegate : NSObject <UIApplicationDelegate> {
-}
-
-@end
-
-@implementation wxAppDelegate
-
-- (void)applicationDidFinishLaunching:(UIApplication *)application {
- wxTheApp->OnInit();
-}
-
-- (void)applicationWillTerminate:(UIApplication *)application {
- wxCloseEvent event;
- wxTheApp->OnEndSession(event);
-}
-
-- (void)dealloc {
- [super dealloc];
-}
-
-@end
-
wxGUIEventLoop::wxGUIEventLoop()
{
}
}
}
+int wxGUIEventLoop::DoDispatchTimeout(unsigned long timeout)
+{
+ return wxCFEventLoop::DoDispatchTimeout(timeout);
+}
+
+void wxGUIEventLoop::DoStop()
+{
+ return wxCFEventLoop::DoStop();
+}
+
+CFRunLoopRef wxGUIEventLoop::CFGetCurrentRunLoop() const
+{
+ return wxCFEventLoop::CFGetCurrentRunLoop();
+}
+
+void wxGUIEventLoop::WakeUp()
+{
+ return wxCFEventLoop::WakeUp();
+}
+
+// TODO move into a evtloop_osx.cpp
+
+wxModalEventLoop::wxModalEventLoop(wxWindow *modalWindow)
+{
+ m_modalWindow = dynamic_cast<wxNonOwnedWindow*> (modalWindow);
+ wxASSERT_MSG( m_modalWindow != NULL, "must pass in a toplevel window for modal event loop" );
+ m_modalNativeWindow = m_modalWindow->GetWXWindow();
+}
+
+wxModalEventLoop::wxModalEventLoop(WXWindow modalNativeWindow)
+{
+ m_modalWindow = NULL;
+ wxASSERT_MSG( modalNativeWindow != NULL, "must pass in a toplevel window for modal event loop" );
+ m_modalNativeWindow = modalNativeWindow;
+}
+
+// END move into a evtloop_osx.cpp
+
+
+void wxModalEventLoop::DoRun()
+{
+ // presentModalViewController:animated:
+}
+
+void wxModalEventLoop::DoStop()
+{
+ // (void)dismissModalViewControllerAnimated:(BOOL)animated
+}