| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef UI_GFX_DISPLAY_H_ | 5 #ifndef UI_GFX_DISPLAY_H_ |
| 6 #define UI_GFX_DISPLAY_H_ | 6 #define UI_GFX_DISPLAY_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "ui/gfx/geometry/rect.h" | 10 #include "ui/gfx/geometry/rect.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 class GFX_EXPORT Display { | 23 class GFX_EXPORT Display { |
| 24 public: | 24 public: |
| 25 // Screen Rotation in clock-wise degrees. | 25 // Screen Rotation in clock-wise degrees. |
| 26 enum Rotation { | 26 enum Rotation { |
| 27 ROTATE_0 = 0, | 27 ROTATE_0 = 0, |
| 28 ROTATE_90, | 28 ROTATE_90, |
| 29 ROTATE_180, | 29 ROTATE_180, |
| 30 ROTATE_270, | 30 ROTATE_270, |
| 31 }; | 31 }; |
| 32 | 32 |
| 33 // The display rotation can have multiple causes for change. A user can set a | |
| 34 // preference. On devices with accelerometers, they can change the rotation. | |
| 35 // RotationSource allows for the tracking of a Rotation per source of the | |
| 36 // change. ROTATION_SOURCE_ACTIVE is the current rotation of the display. | |
| 37 // Rotation changes not due to an accelerometer, nor the user, are to use this | |
| 38 // source directly. | |
| 39 enum RotationSource { | |
| 40 ROTATION_SOURCE_ACCELEROMETER = 0, | |
| 41 ROTATION_SOURCE_ACTIVE, | |
| 42 ROTATION_SOURCE_USER, | |
| 43 }; | |
| 44 | |
| 45 // Touch support for the display. | 33 // Touch support for the display. |
| 46 enum TouchSupport { | 34 enum TouchSupport { |
| 47 TOUCH_SUPPORT_UNKNOWN, | 35 TOUCH_SUPPORT_UNKNOWN, |
| 48 TOUCH_SUPPORT_AVAILABLE, | 36 TOUCH_SUPPORT_AVAILABLE, |
| 49 TOUCH_SUPPORT_UNAVAILABLE, | 37 TOUCH_SUPPORT_UNAVAILABLE, |
| 50 }; | 38 }; |
| 51 | 39 |
| 52 // Creates a display with kInvalidDisplayID as default. | 40 // Creates a display with kInvalidDisplayID as default. |
| 53 Display(); | 41 Display(); |
| 54 explicit Display(int64 id); | 42 explicit Display(int64 id); |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 Rect bounds_; | 129 Rect bounds_; |
| 142 Rect work_area_; | 130 Rect work_area_; |
| 143 float device_scale_factor_; | 131 float device_scale_factor_; |
| 144 Rotation rotation_; | 132 Rotation rotation_; |
| 145 TouchSupport touch_support_; | 133 TouchSupport touch_support_; |
| 146 }; | 134 }; |
| 147 | 135 |
| 148 } // namespace gfx | 136 } // namespace gfx |
| 149 | 137 |
| 150 #endif // UI_GFX_DISPLAY_H_ | 138 #endif // UI_GFX_DISPLAY_H_ |
| OLD | NEW |