Bug 1795082 - Part 2/2: Drop post-processing from getURL() r=zombie
[gecko.git] / widget / uikit / nsAppShell.h
blobc8ae7ce9efeb6e8b8b36230e94b97b6dfd363304
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/. */
6 /*
7 * Runs the main native UIKit run loop, interrupting it as needed to process
8 * Gecko events.
9 */
11 #ifndef nsAppShell_h_
12 #define nsAppShell_h_
14 #include "nsBaseAppShell.h"
15 #include "nsTArray.h"
17 #include <Foundation/NSAutoreleasePool.h>
18 #include <CoreFoundation/CFRunLoop.h>
19 #include <UIKit/UIWindow.h>
21 @class AppShellDelegate;
23 class nsAppShell : public nsBaseAppShell {
24 public:
25 NS_IMETHOD ResumeNative(void) override;
27 nsAppShell();
29 nsresult Init();
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;
40 protected:
41 virtual ~nsAppShell();
43 static void ProcessGeckoEvents(void* aInfo);
44 void ScheduleNativeEventCallback() override;
45 bool ProcessNextNativeEvent(bool aMayWait) override;
47 NSAutoreleasePool* mAutoreleasePool;
48 AppShellDelegate* mDelegate;
49 CFRunLoopRef mCFRunLoop;
50 CFRunLoopSourceRef mCFRunLoopSource;
52 bool mTerminated;
53 bool mNotifiedWillTerminate;
56 #endif // nsAppShell_h_