OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef UI_GFX_MAC_POINT_UTILS_H_ | |
Robert Sesek
2014/06/25 17:06:04
Tests for these functions would be good.
tapted
2014/06/26 08:44:31
Done in https://codereview.chromium.org/345243007/
| |
6 #define UI_GFX_MAC_POINT_UTILS_H_ | |
7 | |
8 #include "ui/gfx/gfx_export.h" | |
9 | |
10 typedef struct _NSRect NSRect; | |
11 | |
12 namespace gfx { | |
13 | |
14 class Rect; | |
15 | |
16 // Convert a gfx::Rect specified with the origin at the top left of the primary | |
17 // display into AppKit secreen coordinates (origin at the bottom left). | |
18 GFX_EXPORT NSRect ScreenRectToNSRect(const gfx::Rect& rect); | |
19 | |
20 // Convert an AppKit NSRect with origin in the bottom left of the primary | |
21 // display into a gfx::Rect with origin at the top left of the primary display. | |
22 GFX_EXPORT gfx::Rect ScreenRectFromNSRect(const NSRect& point); | |
23 | |
24 } // namespace gfx | |
25 | |
26 #endif // UI_GFX_MAC_POINT_UTILS_H_ | |
tapted
2014/06/25 10:55:56
note: not sure it's the best filename, but I've pu
sky
2014/06/25 16:52:22
If you want this to be focused around screen conve
tapted
2014/06/26 08:44:31
Done - went with coordinate_conversions.h/mm (disc
| |
OLD | NEW |