OLD | NEW |
(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 #import <Cocoa/Cocoa.h> |
| 6 #include "ui/gfx/point.h" |
| 7 #include "ui/gfx/rect.h" |
| 8 |
| 9 namespace cocoa_utils { |
| 10 |
| 11 // TODO(dcheng): Move elsewhere so BrowserWindowCocoa can use them too. |
| 12 // Converts a rect from the platfrom-independent screen coordinates (with the |
| 13 // (0,0) in the top-left corner of the primary screen) to the Cocoa screen |
| 14 // coordinates (with (0,0) in the low-left corner). |
| 15 NSRect ConvertRectToCocoaCoordinates(const gfx::Rect& bounds); |
| 16 |
| 17 // Converts a point from the platfrom-independent screen coordinates (with the |
| 18 // (0,0) in the top-left corner of the primary screen) to the Cocoa screen |
| 19 // coordinates (with (0,0) in the low-left corner). |
| 20 NSPoint ConvertPointToCocoaCoordinates(const gfx::Point& point); |
| 21 |
| 22 // Converts a point from the Cocoa screen coordinates (with (0,0) in the |
| 23 // low-left corner of the primary screen) to the platfrom-independent screen |
| 24 // coordinates (with the (0,0) in the top-left corner). |
| 25 gfx::Point ConvertPointFromCocoaCoordinates(NSPoint point); |
| 26 |
| 27 } // namespace cocoa_utils |
OLD | NEW |