@nativescript/core
Version:
A JavaScript library providing an easy to use api for interacting with iOS and Android platform APIs.
111 lines (110 loc) • 4.97 kB
TypeScript
import { resources, collections, getWindow, getApplication, getCurrentActivity, getApplicationContext, getResources, getPackageName, getInputMethodManager, showSoftInput, dismissSoftInput, enableEdgeToEdge, setDarkModeHandler, setNavigationBarColor, setStatusBarColor, getIgnoreEdgeToEdgeOnOlderDevices, setIgnoreEdgeToEdgeOnOlderDevices } from './native-helper-for-android';
export { dataSerialize, dataDeserialize } from './native-helper-for-android';
export { getWindow } from './native-helper-for-android';
export declare const android: {
resources: typeof resources;
collections: typeof collections;
getApplication: typeof getApplication;
getCurrentActivity: typeof getCurrentActivity;
getApplicationContext: typeof getApplicationContext;
getWindow: typeof getWindow;
getResources: typeof getResources;
getPackageName: typeof getPackageName;
getInputMethodManager: typeof getInputMethodManager;
showSoftInput: typeof showSoftInput;
dismissSoftInput: typeof dismissSoftInput;
enableEdgeToEdge: typeof enableEdgeToEdge;
setStatusBarColor: typeof setStatusBarColor;
setNavigationBarColor: typeof setNavigationBarColor;
setDarkModeHandler: typeof setDarkModeHandler;
getIgnoreEdgeToEdgeOnOlderDevices: typeof getIgnoreEdgeToEdgeOnOlderDevices;
setIgnoreEdgeToEdgeOnOlderDevices: typeof setIgnoreEdgeToEdgeOnOlderDevices;
};
/**
* @deprecated Use `Utils.android` instead.
*/
export declare const ad: {
resources: typeof resources;
collections: typeof collections;
getApplication: typeof getApplication;
getCurrentActivity: typeof getCurrentActivity;
getApplicationContext: typeof getApplicationContext;
getWindow: typeof getWindow;
getResources: typeof getResources;
getPackageName: typeof getPackageName;
getInputMethodManager: typeof getInputMethodManager;
showSoftInput: typeof showSoftInput;
dismissSoftInput: typeof dismissSoftInput;
enableEdgeToEdge: typeof enableEdgeToEdge;
setStatusBarColor: typeof setStatusBarColor;
setNavigationBarColor: typeof setNavigationBarColor;
setDarkModeHandler: typeof setDarkModeHandler;
getIgnoreEdgeToEdgeOnOlderDevices: typeof getIgnoreEdgeToEdgeOnOlderDevices;
setIgnoreEdgeToEdgeOnOlderDevices: typeof setIgnoreEdgeToEdgeOnOlderDevices;
};
export declare const iOSNativeHelper: {
collections: {
jsArrayToNSArray<T>(str: T[]): NSArray<T>;
nsArrayToJSArray<T>(a: NSArray<T>): Array<T>;
};
createUIDocumentInteractionControllerDelegate: () => NSObject;
getWindow: () => UIWindow;
getCurrentAppPath: () => string;
getRootViewController: () => UIViewController;
getVisibleViewController: (rootViewController: UIViewController) => UIViewController;
getMainScreen: () => UIScreen;
setWindowBackgroundColor: (value: string) => void;
isLandscape: () => boolean;
snapshotView: (view: UIView, scale: number) => UIImage;
applyRotateTransform: (transform: CATransform3D, x: number, y: number, z: number) => CATransform3D;
printCGRect: (rect: CGRect) => void;
copyLayerProperties: (view: UIView, toView: UIView, customProperties?: {
view?: Array<keyof UIView>;
layer?: Array<keyof CALayer>;
}) => void;
animateWithSpring: (options?: {
tension?: number;
friction?: number;
mass?: number;
delay?: number;
velocity?: number;
animateOptions?: UIViewAnimationOptions;
animations?: () => void;
completion?: (finished?: boolean) => void;
}) => void;
joinPaths: (...paths: string[]) => string;
MajorVersion: number;
};
export declare const ios: {
collections: {
jsArrayToNSArray<T>(str: T[]): NSArray<T>;
nsArrayToJSArray<T>(a: NSArray<T>): Array<T>;
};
createUIDocumentInteractionControllerDelegate: () => NSObject;
getWindow: () => UIWindow;
getCurrentAppPath: () => string;
getRootViewController: () => UIViewController;
getVisibleViewController: (rootViewController: UIViewController) => UIViewController;
getMainScreen: () => UIScreen;
setWindowBackgroundColor: (value: string) => void;
isLandscape: () => boolean;
snapshotView: (view: UIView, scale: number) => UIImage;
applyRotateTransform: (transform: CATransform3D, x: number, y: number, z: number) => CATransform3D;
printCGRect: (rect: CGRect) => void;
copyLayerProperties: (view: UIView, toView: UIView, customProperties?: {
view?: Array<keyof UIView>;
layer?: Array<keyof CALayer>;
}) => void;
animateWithSpring: (options?: {
tension?: number;
friction?: number;
mass?: number;
delay?: number;
velocity?: number;
animateOptions?: UIViewAnimationOptions;
animations?: () => void;
completion?: (finished?: boolean) => void;
}) => void;
joinPaths: (...paths: string[]) => string;
MajorVersion: number;
};