Flutter Engine
Loading...
Searching...
No Matches
dpi_utils.h
Go to the documentation of this file.
1
// Copyright 2013 The Flutter Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#include "Windows.h"
6
7
#ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_DPI_UTILS_H_
8
#define FLUTTER_SHELL_PLATFORM_WINDOWS_DPI_UTILS_H_
9
10
namespace
flutter
{
11
12
constexpr
UINT
kDefaultDpi
= 96;
13
14
/// Returns the DPI for |hwnd|. Supports all DPI awareness modes, and is
15
/// backward compatible down to Windows Vista. If |hwnd| is nullptr, returns the
16
/// DPI for the primary monitor. If Per-Monitor DPI awareness is not available,
17
/// returns the system's DPI.
18
UINT
GetDpiForHWND
(HWND hwnd);
19
20
/// Returns the DPI of a given monitor. Defaults to 96 if the API is not
21
/// available.
22
UINT
GetDpiForMonitor
(HMONITOR monitor);
23
24
}
// namespace flutter
25
26
#endif
// FLUTTER_SHELL_PLATFORM_WINDOWS_DPI_UTILS_H_
flutter
Definition
asset_manager.cc:10
flutter::GetDpiForHWND
UINT GetDpiForHWND(HWND hwnd)
Definition
dpi_utils.cc:128
flutter::GetDpiForMonitor
UINT GetDpiForMonitor(HMONITOR monitor)
Definition
dpi_utils.cc:132
flutter::kDefaultDpi
constexpr UINT kDefaultDpi
Definition
dpi_utils.h:12
UINT
unsigned int UINT
Definition
windows_types.h:32
shell
platform
windows
dpi_utils.h
Generated on Wed Nov 5 2025 21:33:18 for Flutter Engine by
1.9.8