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

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

Issue 789763002: MacViews: Implement capture using NSEvent local+global monitors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@20140812-MacViews-LAYERS2-PRESQUASH
Patch Set: NULL -> nullptr Created 6 years 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
« no previous file with comments | « ui/events/cocoa/events_mac.mm ('k') | ui/gfx/mac/coordinate_conversion.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_GFX_MAC_COORDINATE_CONVERSION_H_ 5 #ifndef UI_GFX_MAC_COORDINATE_CONVERSION_H_
6 #define UI_GFX_MAC_COORDINATE_CONVERSION_H_ 6 #define UI_GFX_MAC_COORDINATE_CONVERSION_H_
7 7
8 #import <Foundation/Foundation.h> 8 #import <Foundation/Foundation.h>
9 9
10 #include "ui/gfx/gfx_export.h" 10 #include "ui/gfx/gfx_export.h"
11 11
12 namespace gfx { 12 namespace gfx {
13 13
14 class Point;
14 class Rect; 15 class Rect;
15 16
16 // Convert a gfx::Rect specified with the origin at the top left of the primary 17 // 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 // display into AppKit screen coordinates (origin at the bottom left).
18 GFX_EXPORT NSRect ScreenRectToNSRect(const gfx::Rect& rect); 19 GFX_EXPORT NSRect ScreenRectToNSRect(const gfx::Rect& rect);
19 20
20 // Convert an AppKit NSRect with origin in the bottom left of the primary 21 // 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 // 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 GFX_EXPORT gfx::Rect ScreenRectFromNSRect(const NSRect& rect);
24
25 // Convert a gfx::Point specified with the origin at the top left of the primary
26 // display into AppKit screen coordinates (origin at the bottom left).
27 GFX_EXPORT NSPoint ScreenPointToNSPoint(const gfx::Point& point);
28
29 // Convert an AppKit NSPoint with origin in the bottom left of the primary
30 // display into a gfx::Point with origin at the top left of the primary display.
31 GFX_EXPORT gfx::Point ScreenPointFromNSPoint(const NSPoint& point);
23 32
24 } // namespace gfx 33 } // namespace gfx
25 34
26 #endif // UI_GFX_MAC_COORDINATE_CONVERSION_H_ 35 #endif // UI_GFX_MAC_COORDINATE_CONVERSION_H_
OLDNEW
« no previous file with comments | « ui/events/cocoa/events_mac.mm ('k') | ui/gfx/mac/coordinate_conversion.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698