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 #include "ui/gfx/screen.h" | 5 #include "ui/gfx/screen.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "ui/gfx/monitor.h" | 10 #include "ui/gfx/monitor.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 gfx::Monitor monitor(0, gfx::Rect(monitor_info.rcMonitor)); | 23 gfx::Monitor monitor(0, gfx::Rect(monitor_info.rcMonitor)); |
24 monitor.set_work_area(gfx::Rect(monitor_info.rcWork)); | 24 monitor.set_work_area(gfx::Rect(monitor_info.rcWork)); |
25 return monitor; | 25 return monitor; |
26 } | 26 } |
27 | 27 |
28 } // namespace | 28 } // namespace |
29 | 29 |
30 namespace gfx { | 30 namespace gfx { |
31 | 31 |
32 // static | 32 // static |
33 bool Screen::IsDIPEnabled() { | |
34 return false; | |
35 } | |
36 | |
37 // static | |
38 gfx::Point Screen::GetCursorScreenPoint() { | 33 gfx::Point Screen::GetCursorScreenPoint() { |
39 POINT pt; | 34 POINT pt; |
40 GetCursorPos(&pt); | 35 GetCursorPos(&pt); |
41 return gfx::Point(pt); | 36 return gfx::Point(pt); |
42 } | 37 } |
43 | 38 |
44 // static | 39 // static |
45 gfx::NativeWindow Screen::GetWindowAtCursorScreenPoint() { | 40 gfx::NativeWindow Screen::GetWindowAtCursorScreenPoint() { |
46 POINT location; | 41 POINT location; |
47 return GetCursorPos(&location) ? WindowFromPoint(location) : NULL; | 42 return GetCursorPos(&location) ? WindowFromPoint(location) : NULL; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 | 79 |
85 // static | 80 // static |
86 gfx::Monitor Screen::GetMonitorMatching(const gfx::Rect& match_rect) { | 81 gfx::Monitor Screen::GetMonitorMatching(const gfx::Rect& match_rect) { |
87 RECT other_bounds_rect = match_rect.ToRECT(); | 82 RECT other_bounds_rect = match_rect.ToRECT(); |
88 MONITORINFO monitor_info = GetMonitorInfoForMonitor(MonitorFromRect( | 83 MONITORINFO monitor_info = GetMonitorInfoForMonitor(MonitorFromRect( |
89 &other_bounds_rect, MONITOR_DEFAULTTONEAREST)); | 84 &other_bounds_rect, MONITOR_DEFAULTTONEAREST)); |
90 return GetMonitor(monitor_info); | 85 return GetMonitor(monitor_info); |
91 } | 86 } |
92 | 87 |
93 } // namespace gfx | 88 } // namespace gfx |
OLD | NEW |