| Flutter Windows Embedder |

Classes | Public Types | Public Member Functions | List of all members
flutter::WindowsProcTable Class Reference

`#include <windows_proc_table.h>`

## Classes
struct | WINDOWCOMPOSITIONATTRIBDATA

## Public Types
enum | WINDOWCOMPOSITIONATTRIB { WCA_ACCENT_POLICY = 19 }

## Public Member Functions
| WindowsProcTable ()
virtual | ~WindowsProcTable ()
virtual BOOL | GetPointerType (UINT32 pointer_id, POINTER_INPUT_TYPE *pointer_type) const
virtual BOOL | GetPointerInfo (UINT32 pointer_id, POINTER_INFO *pointer_info) const
virtual BOOL | GetPointerPenInfo (UINT32 pointer_id, POINTER_PEN_INFO *pointer_pen_info) const
virtual LRESULT | GetThreadPreferredUILanguages (DWORD flags, PULONG count, PZZWSTR languages, PULONG length) const
virtual bool | GetHighContrastEnabled () const
virtual bool | DwmIsCompositionEnabled () const
virtual HRESULT | DwmFlush () const
virtual HCURSOR | LoadCursor (HINSTANCE instance, LPCWSTR cursor_name) const
virtual HCURSOR | SetCursor (HCURSOR cursor) const
virtual BOOL | EnableNonClientDpiScaling (HWND hwnd) const
virtual BOOL | SetWindowCompositionAttribute (HWND hwnd, WINDOWCOMPOSITIONATTRIBDATA *data) const
virtual HRESULT | DwmExtendFrameIntoClientArea (HWND hwnd, const MARGINS *pMarInset) const
virtual HRESULT | DwmSetWindowAttribute (HWND hwnd, DWORD dwAttribute, LPCVOID pvAttribute, DWORD cbAttribute) const
virtual BOOL | AdjustWindowRectExForDpi (LPRECT lpRect, DWORD dwStyle, BOOL bMenu, DWORD dwExStyle, UINT dpi) const
virtual int | GetSystemMetrics (int nIndex) const
virtual BOOL | EnumDisplayDevices (LPCWSTR lpDevice, DWORD iDevNum, PDISPLAY_DEVICE lpDisplayDevice, DWORD dwFlags) const
virtual BOOL | EnumDisplaySettings (LPCWSTR lpszDeviceName, DWORD iModeNum, DEVMODEW *lpDevMode) const
virtual BOOL | GetMonitorInfo (HMONITOR hMonitor, LPMONITORINFO lpmi) const
virtual BOOL | EnumDisplayMonitors (HDC hdc, LPCRECT lprcClip, MONITORENUMPROC lpfnEnum, LPARAM dwData) const

## Detailed Description

Definition at line 18 of file windows_proc_table.h.

## Member Enumeration Documentation

## ◆ WINDOWCOMPOSITIONATTRIB

enum flutter::WindowsProcTable::WINDOWCOMPOSITIONATTRIB

Enumerator
WCA_ACCENT_POLICY |

Definition at line 20 of file windows_proc_table.h.

20 { WCA_ACCENT_POLICY = 19 };
flutter::WindowsProcTable::WCA_ACCENT_POLICY
@ WCA_ACCENT_POLICY
Definition: windows_proc_table.h:20

## Constructor & Destructor Documentation

## ◆ WindowsProcTable()

flutter::WindowsProcTable::WindowsProcTable | ( |  | ) |

Definition at line 12 of file windows_proc_table.cc.

12 {
13 user32_ = fml::NativeLibrary::Create("user32.dll");
14 get_pointer_type_ =
15 user32_->ResolveFunction<GetPointerType_*>("GetPointerType");
16 get_pointer_info_ =
17 user32_->ResolveFunction<GetPointerInfo_*>("GetPointerInfo");
18 get_pointer_pen_info_ =
19 user32_->ResolveFunction<GetPointerPenInfo_*>("GetPointerPenInfo");
20 enable_non_client_dpi_scaling_ =
21 user32_->ResolveFunction<EnableNonClientDpiScaling_*>(
22 "EnableNonClientDpiScaling");
23 set_window_composition_attribute_ =
24 user32_->ResolveFunction<SetWindowCompositionAttribute_*>(
25 "SetWindowCompositionAttribute");
26 adjust_window_rect_ext_for_dpi_ =
27 user32_->ResolveFunction<AdjustWindowRectExForDpi_*>(
28 "AdjustWindowRectExForDpi");
29 }

## ◆ ~WindowsProcTable()

flutter::WindowsProcTable::~WindowsProcTable | ( |  | ) |
| virtual

Definition at line 31 of file windows_proc_table.cc.

31 {
32 user32_ = nullptr;
33 }

## Member Function Documentation

## ◆ AdjustWindowRectExForDpi()

BOOL flutter::WindowsProcTable::AdjustWindowRectExForDpi | ( | LPRECT | lpRect,
|  | DWORD | dwStyle,
|  | BOOL | bMenu,
|  | DWORD | dwExStyle,
|  | UINT | dpi
| ) |  | const
| virtual

Definition at line 133 of file windows_proc_table.cc.

137 {
138 if (!adjust_window_rect_ext_for_dpi_.has_value()) {
139 return FALSE;
140 }
141
142 return adjust_window_rect_ext_for_dpi_.value()(lpRect, dwStyle, bMenu,
143 dwExStyle, dpi);
144 }

Referenced by flutter::HostWindow::GetWindowSizeForClientSize().

## ◆ DwmExtendFrameIntoClientArea()

HRESULT flutter::WindowsProcTable::DwmExtendFrameIntoClientArea | ( | HWND | hwnd,
|  | const MARGINS * | pMarInset
| ) |  | const
| virtual

Definition at line 120 of file windows_proc_table.cc.

122 {
123 return ::DwmExtendFrameIntoClientArea(hwnd, pMarInset);
124 }

## ◆ DwmFlush()

HRESULT flutter::WindowsProcTable::DwmFlush | ( |  | ) | const
| virtual

Definition at line 89 of file windows_proc_table.cc.

89 {
90 return ::DwmFlush();
91 }

## ◆ DwmIsCompositionEnabled()

bool flutter::WindowsProcTable::DwmIsCompositionEnabled | ( |  | ) | const
| virtual

Definition at line 80 of file windows_proc_table.cc.

80 {
81 BOOL composition_enabled;
82 if (SUCCEEDED(::DwmIsCompositionEnabled(&composition_enabled))) {
83 return composition_enabled;
84 }
85
86 return true;
87 }
flutter::WindowsProcTable::DwmIsCompositionEnabled
virtual bool DwmIsCompositionEnabled() const
Definition: windows_proc_table.cc:80

## ◆ DwmSetWindowAttribute()

HRESULT flutter::WindowsProcTable::DwmSetWindowAttribute | ( | HWND | hwnd,
|  | DWORD | dwAttribute,
|  | LPCVOID | pvAttribute,
|  | DWORD | cbAttribute
| ) |  | const
| virtual

Definition at line 126 of file windows_proc_table.cc.

129 {
130 return ::DwmSetWindowAttribute(hwnd, dwAttribute, pvAttribute, cbAttribute);
131 }

## ◆ EnableNonClientDpiScaling()

BOOL flutter::WindowsProcTable::EnableNonClientDpiScaling | ( | HWND | hwnd | ) | const
| virtual

Definition at line 102 of file windows_proc_table.cc.

102 {
103 if (!enable_non_client_dpi_scaling_.has_value()) {
104 return FALSE;
105 }
106
107 return enable_non_client_dpi_scaling_.value()(hwnd);
108 }

Referenced by flutter::HostWindow::WndProc().

## ◆ EnumDisplayDevices()

BOOL flutter::WindowsProcTable::EnumDisplayDevices | ( | LPCWSTR | lpDevice,
|  | DWORD | iDevNum,
|  | PDISPLAY_DEVICE | lpDisplayDevice,
|  | DWORD | dwFlags
| ) |  | const
| virtual

Definition at line 150 of file windows_proc_table.cc.

153 {
154 return ::EnumDisplayDevices(lpDevice, iDevNum, lpDisplayDevice, dwFlags);
155 }

## ◆ EnumDisplayMonitors()

BOOL flutter::WindowsProcTable::EnumDisplayMonitors | ( | HDC | hdc,
|  | LPCRECT | lprcClip,
|  | MONITORENUMPROC | lpfnEnum,
|  | LPARAM | dwData
| ) |  | const
| virtual

Definition at line 168 of file windows_proc_table.cc.

171 {
172 return ::EnumDisplayMonitors(hdc, lprcClip, lpfnEnum, dwData);
173 }

## ◆ EnumDisplaySettings()

BOOL flutter::WindowsProcTable::EnumDisplaySettings | ( | LPCWSTR | lpszDeviceName,
|  | DWORD | iModeNum,
|  | DEVMODEW * | lpDevMode
| ) |  | const
| virtual

Definition at line 157 of file windows_proc_table.cc.

159 {
160 return ::EnumDisplaySettingsW(lpszDeviceName, iModeNum, lpDevMode);
161 }

## ◆ GetHighContrastEnabled()

bool flutter::WindowsProcTable::GetHighContrastEnabled | ( |  | ) | const
| virtual

Definition at line 70 of file windows_proc_table.cc.

70 {
71 HIGHCONTRAST high_contrast = {.cbSize = sizeof(HIGHCONTRAST)};
72 if (!::SystemParametersInfoW(SPI_GETHIGHCONTRAST, sizeof(HIGHCONTRAST),
73 &high_contrast, 0)) {
74 return false;
75 }
76
77 return high_contrast.dwFlags & HCF_HIGHCONTRASTON;
78 }

## ◆ GetMonitorInfo()

BOOL flutter::WindowsProcTable::GetMonitorInfo | ( | HMONITOR | hMonitor,
|  | LPMONITORINFO | lpmi
| ) |  | const
| virtual

Definition at line 163 of file windows_proc_table.cc.

164 {
165 return ::GetMonitorInfoW(hMonitor, lpmi);
166 }

## ◆ GetPointerInfo()

BOOL flutter::WindowsProcTable::GetPointerInfo | ( | UINT32 | pointer_id,
|  | POINTER_INFO * | pointer_info
| ) |  | const
| virtual

Definition at line 44 of file windows_proc_table.cc.

45 {
46 if (!get_pointer_info_.has_value()) {
47 return FALSE;
48 }
49
50 return get_pointer_info_.value()(pointer_id, pointer_info);
51 }

## ◆ GetPointerPenInfo()

BOOL flutter::WindowsProcTable::GetPointerPenInfo | ( | UINT32 | pointer_id,
|  | POINTER_PEN_INFO * | pointer_pen_info
| ) |  | const
| virtual

Definition at line 53 of file windows_proc_table.cc.

55 {
56 if (!get_pointer_pen_info_.has_value()) {
57 return FALSE;
58 }
59
60 return get_pointer_pen_info_.value()(pointer_id, pointer_pen_info);
61 }

## ◆ GetPointerType()

BOOL flutter::WindowsProcTable::GetPointerType | ( | UINT32 | pointer_id,
|  | POINTER_INPUT_TYPE * | pointer_type
| ) |  | const
| virtual

Definition at line 35 of file windows_proc_table.cc.

36 {
37 if (!get_pointer_type_.has_value()) {
38 return FALSE;
39 }
40
41 return get_pointer_type_.value()(pointer_id, pointer_type);
42 }

## ◆ GetSystemMetrics()

int flutter::WindowsProcTable::GetSystemMetrics | ( | int | nIndex | ) | const
| virtual

Definition at line 146 of file windows_proc_table.cc.

146 {
147 return ::GetSystemMetrics(nIndex);
148 }

## ◆ GetThreadPreferredUILanguages()

LRESULT flutter::WindowsProcTable::GetThreadPreferredUILanguages | ( | DWORD | flags,
|  | PULONG | count,
|  | PZZWSTR | languages,
|  | PULONG | length
| ) |  | const
| virtual

Definition at line 63 of file windows_proc_table.cc.

66 {
67 return ::GetThreadPreferredUILanguages(flags, count, languages, length);
68 }

Referenced by flutter::GetPreferredLanguagesFromMUI().

## ◆ LoadCursor()

HCURSOR flutter::WindowsProcTable::LoadCursor | ( | HINSTANCE | instance,
|  | LPCWSTR | cursor_name
| ) |  | const
| virtual

Definition at line 93 of file windows_proc_table.cc.

94 {
95 return ::LoadCursorW(instance, cursor_name);
96 }

## ◆ SetCursor()

HCURSOR flutter::WindowsProcTable::SetCursor | ( | HCURSOR | cursor | ) | const
| virtual

Definition at line 98 of file windows_proc_table.cc.

98 {
99 return ::SetCursor(cursor);
100 }

## ◆ SetWindowCompositionAttribute()

BOOL flutter::WindowsProcTable::SetWindowCompositionAttribute | ( | HWND | hwnd,
|  | WINDOWCOMPOSITIONATTRIBDATA * | data
| ) |  | const
| virtual

Definition at line 110 of file windows_proc_table.cc.

112 {
113 if (!set_window_composition_attribute_.has_value()) {
114 return FALSE;
115 }
116
117 return set_window_composition_attribute_.value()(hwnd, data);
118 }

The documentation for this class was generated from the following files:

- shell/platform/windows/windows_proc_table.h
- shell/platform/windows/windows_proc_table.cc