Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 // Use the <code>system.display</code> API to query display metadata. | 5 // Use the <code>system.display</code> API to query display metadata. |
| 6 namespace system.display { | 6 namespace system.display { |
| 7 | 7 |
| 8 dictionary Bounds { | 8 dictionary Bounds { |
| 9 // The x-coordinate of the upper-left corner. | 9 // The x-coordinate of the upper-left corner. |
| 10 long left; | 10 long left; |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 26 // The y-axis distance from the top bound. | 26 // The y-axis distance from the top bound. |
| 27 long top; | 27 long top; |
| 28 | 28 |
| 29 // The x-axis distance from the right bound. | 29 // The x-axis distance from the right bound. |
| 30 long right; | 30 long right; |
| 31 | 31 |
| 32 // The y-axis distance from the bottom bound. | 32 // The y-axis distance from the bottom bound. |
| 33 long bottom; | 33 long bottom; |
| 34 }; | 34 }; |
| 35 | 35 |
| 36 dictionary Point { | |
| 37 // The x-coordinate of the point. | |
| 38 long x; | |
| 39 | |
| 40 // The y-coordinate of the point. | |
| 41 long y; | |
| 42 }; | |
| 43 | |
| 44 dictionary TouchCalibrationPair { | |
| 45 // The coordinates of the display point. | |
| 46 Point displayPoint; | |
| 47 | |
| 48 // The coordinates of the touch point corresponding to the display point. | |
| 49 Point touchPoint; | |
| 50 }; | |
| 51 | |
| 52 dictionary TouchCalibrationPairQuad { | |
| 53 // First pair of touch and display point required for touch calibration. | |
| 54 TouchCalibrationPair pair1; | |
| 55 | |
| 56 // Second pair of touch and display point required for touch calibration. | |
| 57 TouchCalibrationPair pair2; | |
| 58 | |
| 59 // Third pair of touch and display point required for touch calibration. | |
| 60 TouchCalibrationPair pair3; | |
| 61 | |
| 62 // Fourth pair of touch and display point required for touch calibration. | |
| 63 TouchCalibrationPair pair4; | |
| 64 }; | |
| 65 | |
| 36 dictionary DisplayMode { | 66 dictionary DisplayMode { |
| 37 // The display mode width in device independent (user visible) pixels. | 67 // The display mode width in device independent (user visible) pixels. |
| 38 long width; | 68 long width; |
| 39 | 69 |
| 40 // The display mode height in device independent (user visible) pixels. | 70 // The display mode height in device independent (user visible) pixels. |
| 41 long height; | 71 long height; |
| 42 | 72 |
| 43 // The display mode width in native pixels. | 73 // The display mode width in native pixels. |
| 44 long widthInNativePixels; | 74 long widthInNativePixels; |
| 45 | 75 |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 235 | 265 |
| 236 // Resets the overscan insets for a display to the last saved value (i.e | 266 // Resets the overscan insets for a display to the last saved value (i.e |
| 237 // before Start was called). | 267 // before Start was called). |
| 238 // |id|: The display's unique identifier. | 268 // |id|: The display's unique identifier. |
| 239 static void overscanCalibrationReset(DOMString id); | 269 static void overscanCalibrationReset(DOMString id); |
| 240 | 270 |
| 241 // Complete overscan adjustments for a display by saving the current values | 271 // Complete overscan adjustments for a display by saving the current values |
| 242 // and hiding the overlay. | 272 // and hiding the overlay. |
| 243 // |id|: The display's unique identifier. | 273 // |id|: The display's unique identifier. |
| 244 static void overscanCalibrationComplete(DOMString id); | 274 static void overscanCalibrationComplete(DOMString id); |
| 275 | |
| 276 // Starts touch calibration for a display. This will show an overlay on the | |
| 277 // screen and initialize the UX for touch calibration. If touch calibration | |
| 278 // for display |id| is in progress this will do nothing. | |
|
stevenjb
2016/11/29 18:53:29
We should throw an error of calibration is in prog
malaykeshav
2016/11/30 00:53:16
Done
| |
| 279 // |id|: The display's unique identifier. | |
| 280 static void touchCalibrationStart(DOMString id); | |
| 281 | |
| 282 // Sets the touch calibration pairs for a display. These |pairs| would be | |
| 283 // used to calibrate the touch screen for display |id|. If touch calibration | |
| 284 // for display |id| is in progress this will do nothing. | |
| 285 // |id|: The display's unique identifier. | |
| 286 // |pairs|: The pairs of point used to calibrate the display. | |
| 287 // |bounds|: Bounds of the display when the touch calibration was performed. | |
| 288 // |bounds.left| and |bounds.top| values are no-op. | |
|
stevenjb
2016/11/29 18:53:29
s/no-op/ignored/ ?
malaykeshav
2016/11/30 00:53:16
Done
| |
| 289 static void touchCalibrationSet(DOMString id, | |
| 290 TouchCalibrationPairQuad pairs, | |
| 291 Bounds bounds); | |
| 292 | |
| 293 // Resets the touch calibration for the display and removes the saved | |
| 294 // calibration data. | |
| 295 // |id|: The display's unique identifier. | |
| 296 static void touchCalibrationReset(DOMString id); | |
| 245 }; | 297 }; |
| 246 | 298 |
| 247 interface Events { | 299 interface Events { |
| 248 // Fired when anything changes to the display configuration. | 300 // Fired when anything changes to the display configuration. |
| 249 static void onDisplayChanged(); | 301 static void onDisplayChanged(); |
| 250 }; | 302 }; |
| 251 }; | 303 }; |
| OLD | NEW |