This repository has been archived by the owner on Jul 7, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathindex.d.ts
58 lines (49 loc) · 2.13 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import { Page } from "tns-core-modules/ui/page/page";
export interface OrientationApplierOptions {
object?: Page,
landscape: boolean
}
/** args is a object {object: (current page), landscape: boolean} value **/
export type OrientationApplierCallback = (args: OrientationApplierOptions) => void;
/**
* Adds a new OrientationApplier to be called whenever orientation needs to be applied.
* @param newOrientationApplier [OrientationApplierCallback] - The OrientationApplier that you would like to add.
*/
export function addOrientationApplier(newOrientationApplier: OrientationApplierCallback): void;
/**
* Removes an OrientationApplier from the list of OrientationAppliers to be called whenever orientation needs to be applied.
* @param orientationApplier [OrientationApplierCallback] - The OrientationApplier that you would like to remove.
*/
export function removeOrientationApplier(orientationApplier: OrientationApplierCallback): void
/**
* Get the current orientation of the device.
* @param sensors [boolean] - If true, will return you sensor values on android verses screen size calculation.
* @returns [string] - a value from tns_core_modules/ui/enums/DeviceOrientation
*/
export function getOrientation(sensors?: boolean): string;
/**
* Sets app window to (or from) full screen mode.
* @param shouldBeFullScreen [boolean] - If true, will make app full screen. If false, will make app not full screen.
*/
export function setFullScreen(shouldBeFullScreen: boolean): void;
/**
* Set the orientation of the device.
* @param direction ["portrait" | "landscape" | "landscapeleft" | "landscaperight"] - The orientation/direction to set the device.
* @param animation [boolean] - *** iOS Only *** - this will disable the orientation change animation.
*/
export function setOrientation(
direction?:
| "portrait"
| "landscape"
| "landscapeleft"
| "landscaperight",
animation?: boolean
): void;
/**
* This will enable automatic orientation support.
*/
export function enableRotation(): void;
/**
* This will disable automatic orientation support and lock it to the current orientation.
*/
export function disableRotation(): void;