OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 namespace systemInfo.display { | 5 namespace systemInfo.display { |
6 | 6 |
7 dictionary Bounds { | 7 dictionary Bounds { |
8 // The x-coordinate of the upper-left corner. | 8 // The x-coordinate of the upper-left corner. |
9 long left; | 9 long left; |
| 10 |
10 // The y-coordinate of the upper-left corner. | 11 // The y-coordinate of the upper-left corner. |
11 long top; | 12 long top; |
| 13 |
12 // The width of the display in pixels. | 14 // The width of the display in pixels. |
13 long width; | 15 long width; |
| 16 |
14 // The height of the display in pixels. | 17 // The height of the display in pixels. |
15 long height; | 18 long height; |
16 }; | 19 }; |
17 | 20 |
| 21 dictionary Insets { |
| 22 // The x-axis distance from the left bound. |
| 23 long left; |
| 24 |
| 25 // The y-axis distance from the top bound. |
| 26 long top; |
| 27 |
| 28 // The x-axis distance from the right bound. |
| 29 long right; |
| 30 |
| 31 // The y-axis distance from the bottom bound. |
| 32 long bottom; |
| 33 }; |
| 34 |
18 dictionary DisplayUnitInfo { | 35 dictionary DisplayUnitInfo { |
19 // The unique identifier of the display. | 36 // The unique identifier of the display. |
20 DOMString id; | 37 DOMString id; |
| 38 |
21 // The user-friendly name (e.g. "HP LCD monitor"). | 39 // The user-friendly name (e.g. "HP LCD monitor"). |
22 DOMString name; | 40 DOMString name; |
| 41 |
| 42 // Identifier of the display that is being mirrored on the display unit. |
| 43 // If mirroring is not in progress, set to an empty string. |
| 44 // Currently exposed only on ChromeOS. Will be empty string on other |
| 45 // platforms. |
| 46 DOMString mirroringSourceId; |
| 47 |
23 // True if this is the primary display. | 48 // True if this is the primary display. |
24 boolean isPrimary; | 49 boolean isPrimary; |
| 50 |
25 // True if this is an internal display. | 51 // True if this is an internal display. |
26 boolean isInternal; | 52 boolean isInternal; |
| 53 |
27 // True if this display is enabled. | 54 // True if this display is enabled. |
28 boolean isEnabled; | 55 boolean isEnabled; |
| 56 |
29 // The number of pixels per inch along the x-axis. | 57 // The number of pixels per inch along the x-axis. |
30 double dpiX; | 58 double dpiX; |
| 59 |
31 // The number of pixels per inch along the y-axis. | 60 // The number of pixels per inch along the y-axis. |
32 double dpiY; | 61 double dpiY; |
33 // The bounds of the display. | 62 |
| 63 // The display's clockwise rotation in degrees relative to the vertical |
| 64 // position. |
| 65 // Currently exposed only on ChromeOS. Will be set to 0 on other platforms. |
| 66 long rotation; |
| 67 |
| 68 // The display's logical bounds. |
34 Bounds bounds; | 69 Bounds bounds; |
35 // The usable work area of the display. | 70 |
| 71 // The display's insets within its screen's bounds. |
| 72 // Currently exposed only on ChromeOS. Will be set to empty insets on |
| 73 // other platforms. |
| 74 Insets overscan; |
| 75 |
| 76 // The usable work area of the display within the display bounds. The work |
| 77 // area excludes areas of the display reserved for OS, for example taskbar |
| 78 // and launcher. |
36 Bounds workArea; | 79 Bounds workArea; |
37 }; | 80 }; |
38 | 81 |
39 callback DisplayInfoCallback = void (DisplayUnitInfo[] displayInfo); | 82 callback DisplayInfoCallback = void (DisplayUnitInfo[] displayInfo); |
40 | 83 |
41 interface Functions { | 84 interface Functions { |
42 // Get the information of all attached display devices. | 85 // Get the information of all attached display devices. |
43 static void getDisplayInfo(DisplayInfoCallback callback); | 86 static void getDisplayInfo(DisplayInfoCallback callback); |
44 }; | 87 }; |
45 | 88 |
46 interface Events { | 89 interface Events { |
47 // Fired when anything changes to the display configuration. | 90 // Fired when anything changes to the display configuration. |
48 static void onDisplayChanged(); | 91 static void onDisplayChanged(); |
49 }; | 92 }; |
50 }; | 93 }; |
OLD | NEW |