| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 SERVICES_UI_WS_WINDOW_FINDER_H_ | 5 #ifndef SERVICES_UI_WS_WINDOW_FINDER_H_ |
| 6 #define SERVICES_UI_WS_WINDOW_FINDER_H_ | 6 #define SERVICES_UI_WS_WINDOW_FINDER_H_ |
| 7 | 7 |
| 8 namespace gfx { | 8 namespace gfx { |
| 9 class Point; | 9 class Point; |
| 10 class Transform; | 10 class Transform; |
| 11 } | 11 } |
| 12 | 12 |
| 13 namespace ui { | 13 namespace ui { |
| 14 namespace ws { | 14 namespace ws { |
| 15 | 15 |
| 16 class ServerWindow; | 16 class ServerWindow; |
| 17 | 17 |
| 18 // Find the deepest visible child of |root| that should receive an event at | 18 struct DeepestWindow { |
| 19 // |location|. |location| is initially in the coordinate space of | 19 ServerWindow* window = nullptr; |
| 20 // |root_window|, on return it is converted to the coordinates of the return | 20 bool in_non_client_area = false; |
| 21 // value. Returns null if there is no valid event target window over |location|. | 21 }; |
| 22 ServerWindow* FindDeepestVisibleWindowForEvents( | 22 |
| 23 ServerWindow* root_window, | 23 // Finds the deepest visible child of |root| that should receive an event at |
| 24 gfx::Point* location); | 24 // |location|. |location| is in the coordinate space of |root_window|. The |
| 25 // |window| field in the returned structure is set to the child window. If no |
| 26 // valid child window is found |window| is set to null. |
| 27 DeepestWindow FindDeepestVisibleWindowForEvents(ServerWindow* root_window, |
| 28 const gfx::Point& location); |
| 25 | 29 |
| 26 // Retrieve the transform to the provided |window|'s coordinate space from the | 30 // Retrieve the transform to the provided |window|'s coordinate space from the |
| 27 // root. | 31 // root. |
| 28 gfx::Transform GetTransformToWindow(ServerWindow* window); | 32 gfx::Transform GetTransformToWindow(ServerWindow* window); |
| 29 | 33 |
| 30 } // namespace ws | 34 } // namespace ws |
| 31 } // namespace ui | 35 } // namespace ui |
| 32 | 36 |
| 33 #endif // SERVICES_UI_WS_WINDOW_FINDER_H_ | 37 #endif // SERVICES_UI_WS_WINDOW_FINDER_H_ |
| OLD | NEW |