-
Notifications
You must be signed in to change notification settings - Fork 30.3k
Expand file tree
/
Copy pathdpi_utils.h
More file actions
26 lines (18 loc) · 853 Bytes
/
dpi_utils.h
File metadata and controls
26 lines (18 loc) · 853 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright 2013 The Flutter 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"
#ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_DPI_UTILS_H_
#define FLUTTER_SHELL_PLATFORM_WINDOWS_DPI_UTILS_H_
namespace flutter {
constexpr UINT kDefaultDpi = 96;
/// Returns the DPI for |hwnd|. Supports all DPI awareness modes, and is
/// backward compatible down to Windows Vista. If |hwnd| is nullptr, returns the
/// DPI for the primary monitor. If Per-Monitor DPI awareness is not available,
/// returns the system's DPI.
UINT GetDpiForHWND(HWND hwnd);
/// Returns the DPI of a given monitor. Defaults to 96 if the API is not
/// available.
UINT GetDpiForMonitor(HMONITOR monitor);
} // namespace flutter
#endif // FLUTTER_SHELL_PLATFORM_WINDOWS_DPI_UTILS_H_