OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_WM_CORE_COORDINATE_CONVERSION_H_ | 5 #ifndef UI_WM_CORE_COORDINATE_CONVERSION_H_ |
6 #define UI_WM_CORE_COORDINATE_CONVERSION_H_ | 6 #define UI_WM_CORE_COORDINATE_CONVERSION_H_ |
7 | 7 |
8 #include "ui/wm/wm_export.h" | 8 #include "ui/wm/wm_export.h" |
9 | 9 |
10 namespace aura { | 10 namespace aura { |
11 class Window; | 11 class Window; |
12 } // namespace aura | 12 } // namespace aura |
13 | 13 |
14 namespace gfx { | 14 namespace gfx { |
15 class Point; | 15 class Point; |
16 class Rect; | |
16 } // namespace gfx | 17 } // namespace gfx |
17 | 18 |
18 namespace wm { | 19 namespace wm { |
19 | 20 |
20 // Converts the |point| from a given |window|'s coordinates into the screen | 21 // Converts the |point| from a given |window|'s coordinates into the screen |
21 // coordinates. | 22 // coordinates. |
22 WM_EXPORT void ConvertPointToScreen(const aura::Window* window, | 23 WM_EXPORT void ConvertPointToScreen(const aura::Window* window, |
23 gfx::Point* point); | 24 gfx::Point* point); |
24 | 25 |
25 // Converts the |point| from the screen coordinates to a given |window|'s | 26 // Converts the |point| from the screen coordinates to a given |window|'s |
26 // coordinates. | 27 // coordinates. |
27 WM_EXPORT void ConvertPointFromScreen(const aura::Window* window, | 28 WM_EXPORT void ConvertPointFromScreen(const aura::Window* window, |
28 gfx::Point* point_in_screen); | 29 gfx::Point* point_in_screen); |
29 | 30 |
31 // Converts |rect| from |window|'s coordinates to the virtual screen | |
32 // coordinates. | |
33 WM_EXPORT gfx::Rect ConvertRectToScreen(const aura::Window* window, | |
34 const gfx::Rect& rect); | |
sadrul
2017/01/30 19:46:09
To be consistent with the fns above, would it make
yhanada
2017/01/31 06:34:34
Changed to that.
| |
35 | |
36 // Converts |rect| from virtual screen coordinates to the |window|'s | |
37 // coordinates. | |
38 WM_EXPORT gfx::Rect ConvertRectFromScreen(const aura::Window* window, | |
39 const gfx::Rect& rect); | |
sadrul
2017/01/30 19:46:09
ditto
yhanada
2017/01/31 06:34:34
Done.
| |
40 | |
30 } // namespace wm | 41 } // namespace wm |
31 | 42 |
32 #endif // UI_WM_CORE_COORDINATE_CONVERSION_H_ | 43 #endif // UI_WM_CORE_COORDINATE_CONVERSION_H_ |
OLD | NEW |