feat: support dip <-> screen conversion on Linux (#47125)

* feat: support dip <-> screen conversion on Linux

* chore: fix build
This commit is contained in:
Robo 2025-05-22 01:57:32 +09:00 committed by GitHub
commit a4dfd9b6f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 107 additions and 24 deletions

View file

@ -15,6 +15,7 @@
namespace gfx {
class Point;
class PointF;
class Rect;
class Screen;
} // namespace gfx
@ -58,6 +59,9 @@ class Screen final : public gin::Wrappable<Screen>,
return screen_->GetDisplayMatching(match_rect);
}
gfx::PointF ScreenToDIPPoint(const gfx::PointF& point_px);
gfx::Point DIPToScreenPoint(const gfx::Point& point_dip);
// display::DisplayObserver:
void OnDisplayAdded(const display::Display& new_display) override;
void OnDisplaysRemoved(const display::Displays& removed_displays) override;