mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Windows: cefclient: Improve high-dpi display (issue #1674).
- Add high-dpi support to the OSR example. - Apply DPI scaling to the buttons and URL bar.
This commit is contained in:
@@ -9,6 +9,8 @@
|
||||
#include <windows.h>
|
||||
#include <string>
|
||||
|
||||
#include "include/internal/cef_types_wrappers.h"
|
||||
|
||||
namespace client {
|
||||
|
||||
// Set the window's user data pointer.
|
||||
@@ -30,6 +32,19 @@ int GetCefMouseModifiers(WPARAM wparam);
|
||||
int GetCefKeyboardModifiers(WPARAM wparam, LPARAM lparam);
|
||||
bool IsKeyDown(WPARAM wparam);
|
||||
|
||||
// Returns the device scale factor. For example, 200% display scaling will
|
||||
// return 2.0.
|
||||
float GetDeviceScaleFactor();
|
||||
|
||||
// Convert |value| from logical coordinates to device coordinates.
|
||||
int LogicalToDevice(int value, float device_scale_factor);
|
||||
CefRect LogicalToDevice(const CefRect& value, float device_scale_factor);
|
||||
|
||||
// Convert |value| from device coordinates to logical coordinates.
|
||||
int DeviceToLogical(int value, float device_scale_factor);
|
||||
CefRect DeviceToLogical(const CefRect& value, float device_scale_factor);
|
||||
void DeviceToLogical(CefMouseEvent& value, float device_scale_factor);
|
||||
|
||||
} // namespace client
|
||||
|
||||
#endif // CEF_TESTS_CEFCLIENT_BROWSER_UTIL_WIN_H_
|
||||
|
Reference in New Issue
Block a user