OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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 #ifndef UI_GFX_WIN_DISPLAY_INFO_H_ |
| 6 #define UI_GFX_WIN_DISPLAY_INFO_H_ |
| 7 |
| 8 #include <windows.h> |
| 9 #include <stdint.h> |
| 10 |
| 11 #include "ui/gfx/display.h" |
| 12 #include "ui/gfx/gfx_export.h" |
| 13 |
| 14 namespace gfx { |
| 15 namespace win { |
| 16 |
| 17 // Holds the parameters necessary to create a gfx::win::ScreenWinDisplay |
| 18 class GFX_EXPORT DisplayInfo { |
| 19 public: |
| 20 static int64_t HashDeviceName(const wchar_t* device_name); |
| 21 |
| 22 DisplayInfo(HMONITOR monitor, float device_scale_factor); |
| 23 DisplayInfo(const MONITORINFOEX& monitor_info, |
| 24 gfx::Display::Rotation rotation, |
| 25 float device_scale_factor); |
| 26 |
| 27 int64_t id() const; |
| 28 gfx::Display::Rotation rotation() const; |
| 29 const gfx::Rect& screen_rect() const; |
| 30 const gfx::Rect& screen_work_rect() const; |
| 31 float device_scale_factor() const; |
| 32 |
| 33 private: |
| 34 void InitializeFromMonitorInfo(const MONITORINFOEX& monitor_info); |
| 35 |
| 36 int64_t id_; |
| 37 gfx::Display::Rotation rotation_; |
| 38 gfx::Rect screen_rect_; |
| 39 gfx::Rect screen_work_rect_; |
| 40 float device_scale_factor_; |
| 41 }; |
| 42 |
| 43 } // namespace win |
| 44 } // namespace gfx |
| 45 |
| 46 #endif // UI_GFX_WIN_DISPLAY_INFO_H_ |
OLD | NEW |