1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 * Runs the main native UIKit run loop, interrupting it as needed to process
14 #include "nsBaseAppShell.h"
17 #include <Foundation/NSAutoreleasePool.h>
18 #include <CoreFoundation/CFRunLoop.h>
19 #include <UIKit/UIWindow.h>
21 @
class AppShellDelegate
;
23 class nsAppShell
: public nsBaseAppShell
{
25 NS_IMETHOD
ResumeNative(void) override
;
31 NS_IMETHOD
Run(void) override
;
32 NS_IMETHOD
Exit(void) override
;
33 // Called by the application delegate
34 void WillTerminate(void);
36 static nsAppShell
* gAppShell
;
37 static UIWindow
* gWindow
;
38 static NSMutableArray
* gTopLevelViews
;
41 virtual ~nsAppShell();
43 static void ProcessGeckoEvents(void* aInfo
);
44 virtual void ScheduleNativeEventCallback();
45 virtual bool ProcessNextNativeEvent(bool aMayWait
);
47 NSAutoreleasePool
* mAutoreleasePool
;
48 AppShellDelegate
* mDelegate
;
49 CFRunLoopRef mCFRunLoop
;
50 CFRunLoopSourceRef mCFRunLoopSource
;
53 bool mNotifiedWillTerminate
;
56 #endif // nsAppShell_h_