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

Unified Diff: ui/gfx/mac/coordinate_conversion.h

Issue 1287573002: [Mac] Add gfx::ScreenPoint[To|From]NSPoint. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@openurl
Patch Set: Address comments. Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/gfx/mac/coordinate_conversion.mm » ('j') | ui/gfx/mac/coordinate_conversion.mm » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/mac/coordinate_conversion.h
diff --git a/ui/gfx/mac/coordinate_conversion.h b/ui/gfx/mac/coordinate_conversion.h
index 3deec9a94767d9aee4544bb6386048584eab827b..3b75485357b72d3ad6aff7a1e220000bebd30201 100644
--- a/ui/gfx/mac/coordinate_conversion.h
+++ b/ui/gfx/mac/coordinate_conversion.h
@@ -11,15 +11,24 @@
namespace gfx {
+class Point;
class Rect;
// Convert a gfx::Rect specified with the origin at the top left of the primary
// display into AppKit secreen coordinates (origin at the bottom left).
-GFX_EXPORT NSRect ScreenRectToNSRect(const gfx::Rect& rect);
+GFX_EXPORT NSRect ScreenRectToNSRect(const Rect& rect);
// Convert an AppKit NSRect with origin in the bottom left of the primary
// display into a gfx::Rect with origin at the top left of the primary display.
-GFX_EXPORT gfx::Rect ScreenRectFromNSRect(const NSRect& point);
+GFX_EXPORT Rect ScreenRectFromNSRect(const NSRect& point);
+
+// Convert a gfx::Point specified with the origin at the top left of the primary
+// display into AppKit screen coordinates (origin at the bottom left).
+GFX_EXPORT NSPoint ScreenPointToNSPoint(const Point& point);
+
+// Convert an AppKit NSPoint with origin in the bottom left of the primary
+// display into a gfx::Point with origin at the top left of the primary display.
+GFX_EXPORT Point ScreenPointFromNSPoint(const NSPoint& point);
} // namespace gfx
« no previous file with comments | « no previous file | ui/gfx/mac/coordinate_conversion.mm » ('j') | ui/gfx/mac/coordinate_conversion.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698