UNPKG

3.11 kBTypeScriptView Raw
1import { View } from '../ui/core/view';
2import { NavigationEntry } from '../ui/frame/frame-interfaces';
3import type { iOSApplication as IiOSApplication } from './application';
4import { ApplicationCommon } from './application-common';
5declare class CADisplayLinkTarget extends NSObject {
6 private _owner;
7 static initWithOwner(owner: WeakRef<iOSApplication>): CADisplayLinkTarget;
8 onDisplayed(link: CADisplayLink): void;
9 static ObjCExposedMethods: {
10 onDisplayed: {
11 returns: interop.Type<void>;
12 params: (typeof CADisplayLink)[];
13 };
14 };
15}
16declare class NotificationObserver extends NSObject {
17 private _onReceiveCallback;
18 static initWithCallback(onReceiveCallback: (notification: NSNotification) => void): NotificationObserver;
19 onReceive(notification: NSNotification): void;
20 static ObjCExposedMethods: {
21 onReceive: {
22 returns: interop.Type<void>;
23 params: (typeof NSNotification)[];
24 };
25 };
26}
27export declare class iOSApplication extends ApplicationCommon implements IiOSApplication {
28 private _delegate;
29 private _delegateHandlers;
30 private _window;
31 private _notificationObservers;
32 private _rootView;
33 displayedOnce: boolean;
34 displayedLinkTarget: CADisplayLinkTarget;
35 displayedLink: CADisplayLink;
36 /**
37 * @internal - should not be constructed by the user.
38 */
39 constructor();
40 getRootView(): View;
41 resetRootView(view?: View): void;
42 run(entry?: string | NavigationEntry): void;
43 private runAsMainApp;
44 private runAsEmbeddedApp;
45 private getViewController;
46 private setViewControllerView;
47 setMaxRefreshRate(options?: {
48 min?: number;
49 max?: number;
50 preferred?: number;
51 }): void;
52 get rootController(): UIViewController;
53 get nativeApp(): UIApplication;
54 get window(): UIWindow;
55 get delegate(): UIApplicationDelegate & {
56 prototype: UIApplicationDelegate;
57 };
58 set delegate(value: UIApplicationDelegate | unknown);
59 addDelegateHandler<T extends keyof UIApplicationDelegate>(methodName: T, handler: (typeof UIApplicationDelegate.prototype)[T]): void;
60 getNativeApplication(): UIApplication;
61 addNotificationObserver(notificationName: string, onReceiveCallback: (notification: NSNotification) => void): NotificationObserver;
62 removeNotificationObserver(observer: any, notificationName: string): void;
63 protected getSystemAppearance(): 'light' | 'dark';
64 private getSystemAppearanceValue;
65 protected getOrientation(): "portrait" | "landscape" | "unknown";
66 private getOrientationValue;
67 private notifyAppStarted;
68 _onLivesync(context?: ModuleContext): void;
69 private setWindowContent;
70 private didFinishLaunchingWithOptions;
71 private didBecomeActive;
72 private didEnterBackground;
73 private willTerminate;
74 private didReceiveMemoryWarning;
75 private didChangeStatusBarOrientation;
76 get ios(): this;
77}
78export * from './application-common';
79export declare const Application: iOSApplication;
80export declare const AndroidApplication: any;