OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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_DISPLAY_DISPLAY_FINDER_H_ | 5 #ifndef UI_DISPLAY_DISPLAY_FINDER_H_ |
6 #define UI_DISPLAY_DISPLAY_FINDER_H_ | 6 #define UI_DISPLAY_DISPLAY_FINDER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ui/display/display_export.h" | 10 #include "ui/display/display_export.h" |
11 | 11 |
12 namespace gfx { | 12 namespace gfx { |
13 class Display; | |
14 class Point; | 13 class Point; |
15 class Rect; | 14 class Rect; |
16 } | 15 } |
17 | 16 |
18 namespace display { | 17 namespace display { |
19 using Display = gfx::Display; | 18 class Display; |
20 | 19 |
21 // Returns the display in |displays| closest to |point|. | 20 // Returns the display in |displays| closest to |point|. |
22 DISPLAY_EXPORT const Display* FindDisplayNearestPoint( | 21 DISPLAY_EXPORT const Display* FindDisplayNearestPoint( |
23 const std::vector<Display>& displays, | 22 const std::vector<Display>& displays, |
24 const gfx::Point& point); | 23 const gfx::Point& point); |
25 | 24 |
26 // Returns the display in |displays| with the biggest intersection of |rect|. | 25 // Returns the display in |displays| with the biggest intersection of |rect|. |
27 // If none of the displays intersect |rect| null is returned. | 26 // If none of the displays intersect |rect| null is returned. |
28 DISPLAY_EXPORT const Display* FindDisplayWithBiggestIntersection( | 27 DISPLAY_EXPORT const Display* FindDisplayWithBiggestIntersection( |
29 const std::vector<Display>& displays, | 28 const std::vector<Display>& displays, |
30 const gfx::Rect& rect); | 29 const gfx::Rect& rect); |
31 | 30 |
32 } // namespace display | 31 } // namespace display |
33 | 32 |
34 #endif // UI_DISPLAY_DISPLAY_FINDER_H_ | 33 #endif // UI_DISPLAY_DISPLAY_FINDER_H_ |
OLD | NEW |