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

Side by Side Diff: ui/display/win/dpi.h

Issue 2186163002: Create ScreenWin::GetSystemMetricsInDIP and Correctly Deprecate display::win::GetSystemMetricsInDIP (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a comment Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | ui/display/win/screen_win.h » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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_DISPLAY_WIN_DPI_H_ 5 #ifndef UI_DISPLAY_WIN_DPI_H_
6 #define UI_DISPLAY_WIN_DPI_H_ 6 #define UI_DISPLAY_WIN_DPI_H_
7 7
8 #include "ui/display/display_export.h" 8 #include "ui/display/display_export.h"
9 #include "ui/gfx/geometry/size.h" 9 #include "ui/gfx/geometry/size.h"
10 10
(...skipping 11 matching lines...) Expand all
22 // Gets the system's scale factor. For example, if the system DPI is 96 then the 22 // Gets the system's scale factor. For example, if the system DPI is 96 then the
23 // scale factor is 1.0. This does not handle per-monitor DPI. 23 // scale factor is 1.0. This does not handle per-monitor DPI.
24 DISPLAY_EXPORT float GetDPIScale(); 24 DISPLAY_EXPORT float GetDPIScale();
25 25
26 // Returns the equivalent DPI for |device_scaling_factor|. 26 // Returns the equivalent DPI for |device_scaling_factor|.
27 DISPLAY_EXPORT int GetDPIFromScalingFactor(float device_scaling_factor); 27 DISPLAY_EXPORT int GetDPIFromScalingFactor(float device_scaling_factor);
28 28
29 // Returns the equivalent scaling factor for |dpi|. 29 // Returns the equivalent scaling factor for |dpi|.
30 DISPLAY_EXPORT float GetScalingFactorFromDPI(int dpi); 30 DISPLAY_EXPORT float GetScalingFactorFromDPI(int dpi);
31 31
32 // Deprecated. Use display::win::ScreenWin::GetSystemMetricsForHwnd instead. 32 // Deprecated. Use display::win::ScreenWin::GetSystemMetricsInDIP instead.
33 // 33 //
34 // Win32's GetSystemMetrics uses pixel measures. This function calls 34 // Win32's GetSystemMetrics uses pixel measures. This function calls
35 // GetSystemMetrics for the given |metric|, then converts the result using the 35 // GetSystemMetrics for the given |metric|, then converts the result using the
36 // system's DPI to DIP. This does not handle per-monitor DPI. 36 // system's DPI to DIP.
37 DISPLAY_EXPORT int GetSystemMetricsInDIP(int metric); 37 DISPLAY_EXPORT int GetSystemMetricsInDIP(int metric);
38 38
39 } // namespace win 39 } // namespace win
40 } // namespace display 40 } // namespace display
41 41
42 #endif // UI_DISPLAY_WIN_DPI_H_ 42 #endif // UI_DISPLAY_WIN_DPI_H_
OLDNEW
« no previous file with comments | « no previous file | ui/display/win/screen_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698