mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add screen pixel to screen DIP conversion methods.
On Windows these new CefDisplay methods convert between screen pixel coordinates and screen DIP coordinates. On macOS and Linux these methods just return a copy of the input coordinates.
This commit is contained in:
committed by
Marshall Greenblatt
parent
fa643b269e
commit
485f0b9caf
@@ -9,7 +9,7 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=ba41b36a0cdd335f2a964665576aaf50d8be9c55$
|
||||
// $hash=afef323719b977c74bb86d015ad1b0f5c253c3ba$
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/views/display_ctocpp.h"
|
||||
@@ -110,6 +110,32 @@ void CefDisplay::GetAllDisplays(std::vector<CefRefPtr<CefDisplay>>& displays) {
|
||||
}
|
||||
}
|
||||
|
||||
NO_SANITIZE("cfi-icall")
|
||||
CefPoint CefDisplay::ConvertScreenPointToPixels(const CefPoint& point) {
|
||||
shutdown_checker::AssertNotShutdown();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_point_t _retval = cef_display_convert_screen_point_to_pixels(&point);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
NO_SANITIZE("cfi-icall")
|
||||
CefPoint CefDisplay::ConvertScreenPointFromPixels(const CefPoint& point) {
|
||||
shutdown_checker::AssertNotShutdown();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_point_t _retval = cef_display_convert_screen_point_from_pixels(&point);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
NO_SANITIZE("cfi-icall") int64 CefDisplayCToCpp::GetID() {
|
||||
|
Reference in New Issue
Block a user