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 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
71 // The display's insets within its screen's bounds. | 71 // The display's insets within its screen's bounds. |
72 // Currently exposed only on ChromeOS. Will be set to empty insets on | 72 // Currently exposed only on ChromeOS. Will be set to empty insets on |
73 // other platforms. | 73 // other platforms. |
74 Insets overscan; | 74 Insets overscan; |
75 | 75 |
76 // The usable work area of the display within the display bounds. The work | 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 | 77 // area excludes areas of the display reserved for OS, for example taskbar |
78 // and launcher. | 78 // and launcher. |
79 Bounds workArea; | 79 Bounds workArea; |
80 }; | 80 }; |
81 | |
82 dictionary SetDisplayUnitInfoParams { | |
asargent_no_longer_on_chrome
2013/06/14 17:02:59
nit: let's rename this to something like "DisplayP
tbarzic
2013/06/14 17:40:09
Done.
| |
83 // If set and not empty, starts mirroring between this and the display with | |
84 // the provided id (the system will determine which of the displays is | |
85 // actually mirrored). | |
86 // If set and not empty, stops mirroring between this and the display with | |
87 // the specified id (if mirroring is in progress). | |
88 // If set, no other parameter may be set. | |
89 DOMString? mirroringSourceId; | |
90 | |
91 // If set to true, makes the display primary. No-op if set to false. | |
92 boolean? isPrimary; | |
93 | |
94 // If set, sets the display's overscan insets to the provided values. Note | |
95 // that overscan values may not be negative or larger than a half of the | |
96 // screen's size. Overscan cannot be changed on the internal monitor. | |
97 // It's applied after <code>isPrimary</code> parameter. | |
98 Insets? overscan; | |
99 | |
100 // If set, updates the display's rotation. | |
101 // Legal values are [0, 90, 180, 270]. The rotation is set clockwise, | |
102 // relative to the display's vertical position. | |
103 // It's applied after <code>overscan</code> paramter. | |
104 long? rotation; | |
105 | |
106 // If set, updates the display's logical bounds origin along x-axis. Applied | |
107 // together with <code>boundsOriginY</code>, if <code>boundsOriginY</code> | |
108 // is set. Note that, when updating the display origin, some constraints | |
109 // will be applied, so the final bounds origin may be different than the one | |
110 // set. The final bounds can be retrieved using $ref:getDisplayInfo. | |
111 // The bounds origin is applied after <code>rotation</code>. | |
112 // The bounds origin cannot be changed on the primary display. Note that is | |
113 // also invalid to set bounds origin values if <code>isPrimary</code> is | |
114 // also set (as <code>isPrimary</code> parameter is applied first). | |
115 long? boundsOriginX; | |
116 | |
117 // If set, updates the display's logical bounds origin along y-axis. | |
118 // See documentation for <code>boundsOriginX</code> parameter. | |
119 long? boundsOriginY; | |
120 }; | |
81 | 121 |
82 callback DisplayInfoCallback = void (DisplayUnitInfo[] displayInfo); | 122 callback DisplayInfoCallback = void (DisplayUnitInfo[] displayInfo); |
123 callback SetDisplayUnitInfoCallback = void(); | |
83 | 124 |
84 interface Functions { | 125 interface Functions { |
85 // Get the information of all attached display devices. | 126 // Get the information of all attached display devices. |
86 static void getDisplayInfo(DisplayInfoCallback callback); | 127 static void getDisplayInfo(DisplayInfoCallback callback); |
128 | |
129 // Updates the properties for the display specified by |id|, according to | |
130 // the parameters provided in |info|. On failure, $ref:runtime.lastError | |
131 // will be set. | |
132 // |id|: The display's unique identifier. | |
133 // |info|: The information about display parameters that should be changed, | |
134 // including their new values. | |
135 // |callback|: Empty function called when the function finishes. To find out | |
136 // whether the function succeeded, $ref:runtime.lastError should be | |
137 // queried. | |
138 static void setDisplayProperties( | |
139 DOMString id, | |
140 SetDisplayUnitInfoParams info, | |
141 optional SetDisplayUnitInfoCallback callback); | |
87 }; | 142 }; |
88 | 143 |
89 interface Events { | 144 interface Events { |
90 // Fired when anything changes to the display configuration. | 145 // Fired when anything changes to the display configuration. |
91 static void onDisplayChanged(); | 146 static void onDisplayChanged(); |
92 }; | 147 }; |
93 }; | 148 }; |
OLD | NEW |