blob: 656bb4a4a061c9b1172a33de072e0911bb7e599d [file] [log] [blame]
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <windows.h>
#include <stdint.h>
#include "ui/display/display.h"
#include "ui/display/display_export.h"
namespace display {
namespace win {
// Gathers the parameters necessary to create a win::ScreenWinDisplay.
class DISPLAY_EXPORT DisplayInfo final {
DisplayInfo(const MONITORINFOEX& monitor_info,
float device_scale_factor,
float sdr_white_level,
Display::Rotation rotation,
int display_frequency);
static int64_t DeviceIdFromDeviceName(const wchar_t* device_name);
int64_t id() const { return id_; }
Display::Rotation rotation() const { return rotation_; }
const gfx::Rect& screen_rect() const { return screen_rect_; }
const gfx::Rect& screen_work_rect() const { return screen_work_rect_; }
float device_scale_factor() const { return device_scale_factor_; }
float sdr_white_level() const { return sdr_white_level_; }
int display_frequency() const { return display_frequency_; }
int64_t id_;
Display::Rotation rotation_;
gfx::Rect screen_rect_;
gfx::Rect screen_work_rect_;
float device_scale_factor_;
float sdr_white_level_;
int display_frequency_;
} // namespace win
} // namespace display