OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 namespace systemInfo.display { |
| 6 |
| 7 dictionary Bounds { |
| 8 // The x-coordinate of the upper-left corner. |
| 9 long left; |
| 10 // The y-coordinate of the upper-left corner. |
| 11 long top; |
| 12 // The width of the display in pixels. |
| 13 long width; |
| 14 // The height of the display in pixels. |
| 15 long height; |
| 16 }; |
| 17 |
| 18 dictionary DisplayUnitInfo { |
| 19 // The unique identifier of the display. |
| 20 DOMString id; |
| 21 // The user-friendly name (e.g. "HP LCD monitor"). |
| 22 DOMString name; |
| 23 // True if this is the primary display. |
| 24 boolean isPrimary; |
| 25 // True if this is an internal display. |
| 26 boolean isInternal; |
| 27 // True if this display is enabled. |
| 28 boolean isEnabled; |
| 29 // The number of pixels per inch along the x-axis. |
| 30 double dpiX; |
| 31 // The number of pixels per inch along the y-axis. |
| 32 double dpiY; |
| 33 // The bounds of the display. |
| 34 Bounds bounds; |
| 35 // The usable work area of the display. |
| 36 Bounds workArea; |
| 37 }; |
| 38 |
| 39 callback DisplayInfoCallback = void (DisplayUnitInfo[] displayInfo); |
| 40 |
| 41 interface Functions { |
| 42 // Get the information of all attached display devices. |
| 43 static void getDisplayInfo(DisplayInfoCallback callback); |
| 44 }; |
| 45 |
| 46 interface Events { |
| 47 // Fired when anything changes to the display configuration. |
| 48 static void onDisplayChanged(); |
| 49 }; |
| 50 }; |
OLD | NEW |