UNPKG

2.67 kBTypeScriptView Raw
1import { iOSApplication as iOSApplicationDefinition } from '.';
2export * from './application-common';
3import { View } from '../ui/core/view';
4import { NavigationEntry } from '../ui/frame/frame-interfaces';
5declare class NotificationObserver extends NSObject {
6 private _onReceiveCallback;
7 static initWithCallback(onReceiveCallback: (notification: NSNotification) => void): NotificationObserver;
8 onReceive(notification: NSNotification): void;
9 static ObjCExposedMethods: {
10 onReceive: {
11 returns: interop.Type<void>;
12 params: (typeof NSNotification)[];
13 };
14 };
15}
16export declare function setMaxRefreshRate(options?: {
17 min?: number;
18 max?: number;
19 preferred?: number;
20}): void;
21export declare class iOSApplication implements iOSApplicationDefinition {
22 private _backgroundColor;
23 private _delegate;
24 private _window;
25 private _observers;
26 private _orientation;
27 private _rootView;
28 private _systemAppearance;
29 constructor();
30 get orientation(): 'portrait' | 'landscape' | 'unknown';
31 get rootController(): UIViewController;
32 get systemAppearance(): 'light' | 'dark' | null;
33 get nativeApp(): UIApplication;
34 get window(): UIWindow;
35 get delegate(): typeof UIApplicationDelegate;
36 set delegate(value: typeof UIApplicationDelegate);
37 get rootView(): View;
38 addNotificationObserver(notificationName: string, onReceiveCallback: (notification: NSNotification) => void): NotificationObserver;
39 removeNotificationObserver(observer: any, notificationName: string): void;
40 private didFinishLaunchingWithOptions;
41 notifyAppStarted(notification?: NSNotification): void;
42 private didBecomeActive;
43 private didEnterBackground;
44 private willTerminate;
45 private didChangeStatusBarOrientation;
46 private didReceiveMemoryWarning;
47 private getOrientationValue;
48 _onLivesync(context?: ModuleContext): void;
49 setWindowContent(view?: View): void;
50}
51declare let iosApp: iOSApplication;
52export { iosApp as ios };
53export declare function ensureNativeApplication(): void;
54export declare function getMainEntry(): NavigationEntry;
55export declare function getRootView(): View;
56export declare function run(entry?: string | NavigationEntry): void;
57export declare function addCss(cssText: string, attributeScoped?: boolean): void;
58export declare function _resetRootView(entry?: NavigationEntry | string): void;
59export declare function getNativeApplication(): UIApplication;
60export declare function orientation(): 'portrait' | 'landscape' | 'unknown';
61export declare function systemAppearance(): 'dark' | 'light';
62export declare const AndroidApplication: any;