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 ASH_DISPLAY_DISPLAY_UTIL_H_ | 5 #ifndef ASH_DISPLAY_DISPLAY_UTIL_H_ |
6 #define ASH_DISPLAY_DISPLAY_UTIL_H_ | 6 #define ASH_DISPLAY_DISPLAY_UTIL_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 void MoveCursorTo(AshWindowTreeHost* ash_host, | 80 void MoveCursorTo(AshWindowTreeHost* ash_host, |
81 const gfx::Point& point_in_screen, | 81 const gfx::Point& point_in_screen, |
82 bool update_last_location_now); | 82 bool update_last_location_now); |
83 | 83 |
84 // Returns the index in the displays whose bounds contains |point_in_screen|. | 84 // Returns the index in the displays whose bounds contains |point_in_screen|. |
85 // Returns -1 if no such display exist. | 85 // Returns -1 if no such display exist. |
86 ASH_EXPORT int FindDisplayIndexContainingPoint( | 86 ASH_EXPORT int FindDisplayIndexContainingPoint( |
87 const std::vector<gfx::Display>& displays, | 87 const std::vector<gfx::Display>& displays, |
88 const gfx::Point& point_in_screen); | 88 const gfx::Point& point_in_screen); |
89 | 89 |
90 // Creates the DisplayIdPair where ids are sorted in the following manner. | 90 // Creates the DisplayIdPair where ids are sorted using |CompareDisplayIds| |
91 // 1) ID for internal display comes first. | 91 // below. |
92 // 2) If none of the ids are internal, sorted by the output index. | |
93 ASH_EXPORT DisplayIdPair CreateDisplayIdPair(int64 id1, int64 id2); | 92 ASH_EXPORT DisplayIdPair CreateDisplayIdPair(int64 id1, int64 id2); |
94 | 93 |
| 94 // Returns true if one of following conditinos is met. |
| 95 // 1) id1 is internal. |
| 96 // 2) output index of id1 < output index of id2 and id2 isn't internal. |
| 97 ASH_EXPORT bool CompareDisplayIds(int64 id1, int64 id2); |
| 98 |
95 } // namespace ash | 99 } // namespace ash |
96 | 100 |
97 #endif // ASH_DISPLAY_DISPLAY_UTIL_H_ | 101 #endif // ASH_DISPLAY_DISPLAY_UTIL_H_ |
OLD | NEW |