X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/80eee8378f6b6e8b9ecae46062c2b66ff4469f48..6f07c007a54c53c1561944f139254e8afa1477cc:/src/osx/iphone/evtloop.mm diff --git a/src/osx/iphone/evtloop.mm b/src/osx/iphone/evtloop.mm index ca463a6dcf..2a78c68178 100644 --- a/src/osx/iphone/evtloop.mm +++ b/src/osx/iphone/evtloop.mm @@ -32,6 +32,10 @@ #include "wx/log.h" +#if wxUSE_GUI + #include "wx/nonownedwnd.h" +#endif + #include "wx/osx/private.h" // ============================================================================ @@ -75,28 +79,6 @@ static int CalculateUIEventMaskFromEventCategory(wxEventCategory cat) } */ -@interface wxAppDelegate : NSObject { -} - -@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() { } @@ -115,3 +97,47 @@ void wxGUIEventLoop::DoRun() } } +int wxGUIEventLoop::DoDispatchTimeout(unsigned long timeout) +{ + return wxCFEventLoop::DoDispatchTimeout(timeout); +} + +void wxGUIEventLoop::DoStop() +{ + return wxCFEventLoop::DoStop(); +} + +CFRunLoopRef wxGUIEventLoop::CFGetCurrentRunLoop() const +{ + return wxCFEventLoop::CFGetCurrentRunLoop(); +} + + +// TODO move into a evtloop_osx.cpp + +wxModalEventLoop::wxModalEventLoop(wxWindow *modalWindow) +{ + m_modalWindow = dynamic_cast (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 +}