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

Side by Side Diff: ui/gfx/mac/point_utils.h

Issue 353643002: MacViews: Implement Set/Get*Bounds for NativeWidgetMac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Refine Created 6 years, 5 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
OLDNEW
(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
OLDNEW
« no previous file with comments | « ui/gfx/gfx.gyp ('k') | ui/gfx/mac/point_utils.mm » ('j') | ui/views/widget/native_widget_mac.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698