forked from NativeScript/NativeScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplatform.d.ts
More file actions
105 lines (90 loc) · 2.46 KB
/
platform.d.ts
File metadata and controls
105 lines (90 loc) · 2.46 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
/* tslint:disable:class-name */
/**
* Contains all kinds of information about the device, its operating system and software.
*/
declare module "platform" {
/*
* Enum holding platform names.
*/
export module platformNames {
export var android: string;
export var ios: string;
}
/*
* An object containing device specific information.
*/
export class device {
/**
* Gets the manufacturer of the device.
* For example: "Apple" or "HTC" or "Samsung".
*/
static manufacturer: string;
/**
* Gets the model of the device.
* For example: "Nexus 5" or "iPhone".
*/
static model: string;
/**
* Gets the model of the device.
* For example: "Android" or "iOS".
*/
static os: string;
/**
* Gets the OS version.
* For example: 4.4.4(android), 8.1(ios)
*/
static osVersion: string;
/**
* Gets the OS version.
* For example: 19(android), 8.1(ios).
*/
static sdkVersion: string;
/**
* Gets the type current device.
* Available values: "phone", "tablet".
*/
static deviceType: string;
/**
* Gets the uuid
*/
static uuid: string;
/**
* Gets the preferred language. For example "en" or "en_US"
*/
static language: string;
}
/**
* An object containing screen information.
*/
export interface ScreenMetrics {
/**
* Gets the absolute width of the screen in pixels.
*/
widthPixels: number;
/**
* Gets the absolute height of the screen in pixels.
*/
heightPixels: number;
/**
* Gets the absolute width of the screen in density independent pixels.
*/
widthDIPs: number;
/**
* Gets the absolute height of the screen in density independent pixels.
*/
heightDIPs: number;
/**
* The logical density of the display. This is a scaling factor for the Density Independent Pixel unit.
*/
scale: number;
}
/**
* An object describing general information about a display.
*/
export class screen {
/**
* Gets information about the main screen of the current device.
*/
static mainScreen: ScreenMetrics;
}
}