Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Side by Side Diff: ash/wm/coordinate_conversion.h

Issue 10835047: Allow the cursor to warp even when a window is dragged (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: style fix Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/ui_controls_ash.cc ('k') | ash/wm/coordinate_conversion.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef ASH_WM_COORDINATE_CONVERSION_H_
6 #define ASH_WM_COORDINATE_CONVERSION_H_
7
8 #include "ash/ash_export.h"
9
10 #include "ui/gfx/point.h"
11
12 namespace aura {
13 class RootWindow;
14 class Window;
15 } // namespace gfx
16
17 namespace gfx {
18 class Rect;
19 } // namespace gfx
20
21 namespace ash {
22 namespace wm {
23
24 // Returns the RootWindow at |point| in the virtual screen coordinates.
25 // Returns NULL if the root window does not exist at the given
26 // point.
27 ASH_EXPORT aura::RootWindow* GetRootWindowAt(const gfx::Point& point);
28
29 // Returns the RootWindow that shares the most area with |rect| in
30 // the virtual scren coordinates.
31 ASH_EXPORT aura::RootWindow* GetRootWindowMatching(const gfx::Rect& rect);
32
33 // Finds the root window at |location| in |window|'s coordinates and returns a
34 // pair of root window and location in that root window's coordinates. The
35 // function usually returns |window->GetRootWindow()|, but if the mouse pointer
36 // is moved outside the |window|'s root while the mouse is captured, it returns
37 // the other root window.
38 ASH_EXPORT std::pair<aura::RootWindow*, gfx::Point>
39 GetRootWindowRelativeToWindow(aura::Window* window, const gfx::Point& location);
40
41 // Converts the |point| from a given |window|'s coordinates into the screen
42 // coordinates.
43 ASH_EXPORT void ConvertPointToScreen(aura::Window* window, gfx::Point* point);
44
45 // Converts the |point| from the screen coordinates to a given |window|'s
46 // coordinates.
47 ASH_EXPORT void ConvertPointFromScreen(aura::Window* window,
48 gfx::Point* point_in_screen);
49
50 } // namespace wm
51 } // namespace ash
52
53 #endif // ASH_WM_COORDINATE_CONVERSION_H_
OLDNEW
« no previous file with comments | « ash/ui_controls_ash.cc ('k') | ash/wm/coordinate_conversion.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698