22 constexpr
wchar_t kWindowClassName[] = L
"FLUTTER_HOST_WINDOW";
26 flutter::Size ClampToVirtualScreen(flutter::Size size) {
27 double const virtual_screen_width = GetSystemMetrics(SM_CXVIRTUALSCREEN);
28 double const virtual_screen_height = GetSystemMetrics(SM_CYVIRTUALSCREEN);
30 return flutter::Size(std::clamp(size.width(), 0.0, virtual_screen_width),
31 std::clamp(size.height(), 0.0, virtual_screen_height));
34 void EnableTransparentWindowBackground(HWND hwnd,
36 enum ACCENT_STATE { ACCENT_DISABLED = 0 };
38 struct ACCENT_POLICY {
39 ACCENT_STATE AccentState;
46 ACCENT_POLICY accent = {ACCENT_DISABLED, 2,
static_cast<DWORD
>(0), 0};
49 flutter::WindowsProcTable::WINDOWCOMPOSITIONATTRIB::WCA_ACCENT_POLICY,
51 .cbData =
sizeof(accent)};
56 MARGINS
const margins = {-1};
65 std::string GetLastErrorAsString() {
66 LPWSTR message_buffer =
nullptr;
68 if (DWORD
const size = FormatMessage(
69 FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM |
70 FORMAT_MESSAGE_IGNORE_INSERTS,
71 nullptr, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
72 reinterpret_cast<LPTSTR
>(&message_buffer), 0,
nullptr)) {
73 std::wstring
const wide_message(message_buffer, size);
74 LocalFree(message_buffer);
75 message_buffer =
nullptr;
77 if (
int const buffer_size =
78 WideCharToMultiByte(CP_UTF8, 0, wide_message.c_str(), -1,
nullptr,
79 0,
nullptr,
nullptr)) {
80 std::string
message(buffer_size, 0);
81 WideCharToMultiByte(CP_UTF8, 0, wide_message.c_str(), -1, &
message[0],
82 buffer_size,
nullptr,
nullptr);
88 LocalFree(message_buffer);
90 std::ostringstream oss;
91 oss <<
"Format message failed with 0x" << std::hex << std::setfill(
'0')
92 << std::setw(8) << GetLastError();
98 bool IsClassRegistered(LPCWSTR class_name) {
99 WNDCLASSEX window_class = {};
100 return GetClassInfoEx(GetModuleHandle(
nullptr), class_name, &window_class) !=
110 #ifndef DWMWA_USE_IMMERSIVE_DARK_MODE
111 #define DWMWA_USE_IMMERSIVE_DARK_MODE 20
115 void UpdateTheme(HWND window) {
117 const wchar_t kGetPreferredBrightnessRegKey[] =
118 L
"Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize";
119 const wchar_t kGetPreferredBrightnessRegValue[] = L
"AppsUseLightTheme";
124 DWORD light_mode_size =
sizeof(light_mode);
125 LSTATUS
const result =
126 RegGetValue(HKEY_CURRENT_USER, kGetPreferredBrightnessRegKey,
127 kGetPreferredBrightnessRegValue, RRF_RT_REG_DWORD,
nullptr,
128 &light_mode, &light_mode_size);
130 if (result == ERROR_SUCCESS) {
131 BOOL enable_dark_mode = light_mode == 0;
133 &enable_dark_mode,
sizeof(enable_dark_mode));
138 void SetChildContent(HWND
content, HWND window) {
141 GetClientRect(window, &client_rect);
142 MoveWindow(
content, client_rect.left, client_rect.top,
143 client_rect.right - client_rect.left,
144 client_rect.bottom - client_rect.top,
true);
162 void AdjustAlongAxis(LONG dst_origin, LONG dst_size, LONG* origin, LONG* size) {
163 *size = std::min(dst_size, *size);
164 if (*origin < dst_origin)
165 *origin = dst_origin;
167 *origin = std::min(dst_origin + dst_size, *origin + *size) - *size;
170 RECT AdjustToFit(
const RECT& parent,
const RECT& child) {
171 auto new_x = child.left;
172 auto new_y = child.top;
179 result.right = new_x + new_width;
181 result.bottom = new_y + new_height;
185 flutter::BoxConstraints FromWindowConstraints(
187 std::optional<flutter::Size> smallest, biggest;
198 return flutter::BoxConstraints(smallest, biggest);
212 window_manager, engine, preferred_size,
213 FromWindowConstraints(preferred_constraints), title));
223 return std::unique_ptr<HostWindow>(
225 FromWindowConstraints(preferred_constraints), title,
226 parent ? parent : std::optional<HWND>()));
236 window_manager, engine, FromWindowConstraints(preferred_constraints),
237 get_position_callback, parent));
242 : window_manager_(window_manager), engine_(engine) {}
247 auto view_window = std::make_unique<FlutterWindow>(
251 std::unique_ptr<FlutterWindowsView> view =
254 FML_CHECK(view !=
nullptr);
257 std::make_unique<FlutterWindowsViewController>(
nullptr, std::move(view));
265 if (!IsClassRegistered(kWindowClassName)) {
266 auto const idi_app_icon = 101;
267 WNDCLASSEX window_class = {};
268 window_class.cbSize =
sizeof(WNDCLASSEX);
269 window_class.style = CS_HREDRAW | CS_VREDRAW;
271 window_class.hInstance = GetModuleHandle(
nullptr);
273 LoadIcon(window_class.hInstance, MAKEINTRESOURCE(idi_app_icon));
274 if (!window_class.hIcon) {
275 window_class.hIcon = LoadIcon(
nullptr, IDI_APPLICATION);
277 window_class.hCursor = LoadCursor(
nullptr, IDC_ARROW);
278 window_class.lpszClassName = kWindowClassName;
280 FML_CHECK(RegisterClassEx(&window_class));
298 DwmGetWindowAttribute(
window_handle_, DWMWA_EXTENDED_FRAME_BOUNDS,
299 &frame_rect,
sizeof(frame_rect));
302 LONG
const left_dropshadow_width = frame_rect.left - window_rect.left;
303 LONG
const top_dropshadow_height = window_rect.top - frame_rect.top;
305 window_rect.left - left_dropshadow_width,
306 window_rect.top - top_dropshadow_height, 0, 0,
307 SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE);
318 if (::IsWindow(hwnd)) {
319 ShowWindow(hwnd, cmd_show);
322 SetWindowLongPtr(window_handle_, GWLP_USERDATA,
323 reinterpret_cast<LONG_PTR
>(
this));
326 HostWindow::~HostWindow() {
327 if (view_controller_) {
330 if (!UnregisterClass(kWindowClassName, GetModuleHandle(
nullptr))) {
332 SetLastError(ERROR_SUCCESS);
338 wchar_t class_name[256];
339 if (!GetClassName(hwnd, class_name,
sizeof(class_name) /
sizeof(
wchar_t))) {
340 FML_LOG(ERROR) <<
"Failed to get class name for window handle " << hwnd
341 <<
": " << GetLastErrorAsString();
345 if (wcscmp(class_name, kWindowClassName) != 0) {
349 return reinterpret_cast<HostWindow*
>(GetWindowLongPtr(hwnd, GWLP_USERDATA));
352 HWND HostWindow::GetWindowHandle()
const {
353 return window_handle_;
356 HWND HostWindow::GetFlutterViewWindowHandle()
const {
362 if (window !=
nullptr && child_content !=
nullptr) {
363 SetFocus(child_content);
367 LRESULT HostWindow::WndProc(HWND hwnd,
372 auto*
const create_struct =
reinterpret_cast<CREATESTRUCT*
>(lparam);
373 auto*
const windows_proc_table =
376 EnableTransparentWindowBackground(hwnd, *windows_proc_table);
377 }
else if (
HostWindow*
const window = GetThisFromHandle(hwnd)) {
378 return window->HandleMessage(hwnd,
message, wparam, lparam);
381 return DefWindowProc(hwnd,
message, wparam, lparam);
384 LRESULT HostWindow::HandleMessage(HWND hwnd,
388 auto result = engine_->window_proc_delegate_manager()->OnTopLevelWindowProc(
389 window_handle_,
message, wparam, lparam);
396 is_being_destroyed_ =
true;
399 case WM_NCLBUTTONDOWN: {
403 if (SendMessage(window_handle_, WM_NCHITTEST, wparam, lparam) ==
409 GetCursorPos(&cursorPos);
410 ScreenToClient(window_handle_, &cursorPos);
411 PostMessage(window_handle_, WM_MOUSEMOVE, 0,
412 MAKELPARAM(cursorPos.x, cursorPos.y));
417 case WM_DPICHANGED: {
418 auto*
const new_scaled_window_rect =
reinterpret_cast<RECT*
>(lparam);
420 new_scaled_window_rect->right - new_scaled_window_rect->left;
422 new_scaled_window_rect->bottom - new_scaled_window_rect->top;
423 SetWindowPos(hwnd,
nullptr, new_scaled_window_rect->left,
424 new_scaled_window_rect->top, width, height,
425 SWP_NOZORDER | SWP_NOACTIVATE);
429 case WM_GETMINMAXINFO: {
431 GetWindowRect(hwnd, &window_rect);
433 GetClientRect(hwnd, &client_rect);
434 LONG
const non_client_width = (window_rect.right - window_rect.left) -
435 (client_rect.right - client_rect.left);
436 LONG
const non_client_height = (window_rect.bottom - window_rect.top) -
437 (client_rect.bottom - client_rect.top);
440 double const scale_factor =
441 static_cast<double>(dpi) / USER_DEFAULT_SCREEN_DPI;
443 MINMAXINFO* info =
reinterpret_cast<MINMAXINFO*
>(lparam);
444 Size
const min_physical_size = ClampToVirtualScreen(Size(
445 box_constraints_.smallest().width() * scale_factor + non_client_width,
446 box_constraints_.smallest().height() * scale_factor +
449 info->ptMinTrackSize.x = min_physical_size.width();
450 info->ptMinTrackSize.y = min_physical_size.height();
451 Size
const max_physical_size = ClampToVirtualScreen(Size(
452 box_constraints_.biggest().width() * scale_factor + non_client_width,
453 box_constraints_.biggest().height() * scale_factor +
456 info->ptMaxTrackSize.x = max_physical_size.width();
457 info->ptMaxTrackSize.y = max_physical_size.height();
462 auto child_content = view_controller_->view()->GetWindowHandle();
463 if (child_content !=
nullptr) {
466 GetClientRect(hwnd, &client_rect);
467 MoveWindow(child_content, client_rect.left, client_rect.top,
468 client_rect.right - client_rect.left,
469 client_rect.bottom - client_rect.top, TRUE);
475 FocusRootViewOf(
this);
478 case WM_DWMCOLORIZATIONCOLORCHANGED:
486 if (!view_controller_) {
490 return DefWindowProc(hwnd,
message, wparam, lparam);
498 if (GetFullscreen()) {
499 std::optional<Size>
const window_size = GetWindowSizeForClientSize(
500 *engine_->windows_proc_table(),
502 box_constraints_.smallest(), box_constraints_.biggest(),
503 saved_window_info_.style, saved_window_info_.ex_style,
nullptr);
508 saved_window_info_.client_size =
511 saved_window_info_.rect.right =
512 saved_window_info_.rect.left +
static_cast<LONG
>(window_size->width());
513 saved_window_info_.rect.bottom =
514 saved_window_info_.rect.top +
static_cast<LONG
>(window_size->height());
516 WINDOWINFO window_info = {.cbSize =
sizeof(WINDOWINFO)};
517 GetWindowInfo(window_handle_, &window_info);
519 std::optional<Size>
const window_size = GetWindowSizeForClientSize(
520 *engine_->windows_proc_table(),
522 box_constraints_.smallest(), box_constraints_.biggest(),
523 window_info.dwStyle, window_info.dwExStyle,
nullptr);
529 SetWindowPos(window_handle_, NULL, 0, 0, window_size->width(),
530 window_size->height(),
531 SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
536 box_constraints_ = FromWindowConstraints(constraints);
538 if (GetFullscreen()) {
539 std::optional<Size>
const window_size = GetWindowSizeForClientSize(
540 *engine_->windows_proc_table(),
541 Size(saved_window_info_.client_size.width,
542 saved_window_info_.client_size.height),
543 box_constraints_.smallest(), box_constraints_.biggest(),
544 saved_window_info_.style, saved_window_info_.ex_style,
nullptr);
549 saved_window_info_.rect.right =
550 saved_window_info_.rect.left +
static_cast<LONG
>(window_size->width());
551 saved_window_info_.rect.bottom =
552 saved_window_info_.rect.top +
static_cast<LONG
>(window_size->height());
554 auto const client_size = GetWindowContentSize(window_handle_);
555 auto const current_size = Size(client_size.width, client_size.height);
556 WINDOWINFO window_info = {.cbSize =
sizeof(WINDOWINFO)};
557 GetWindowInfo(window_handle_, &window_info);
558 std::optional<Size>
const window_size = GetWindowSizeForClientSize(
559 *engine_->windows_proc_table(), current_size,
560 box_constraints_.smallest(), box_constraints_.biggest(),
561 window_info.dwStyle, window_info.dwExStyle,
nullptr);
563 if (window_size && current_size != window_size) {
564 SetWindowPos(window_handle_, NULL, 0, 0, window_size->width(),
565 window_size->height(),
566 SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
576 void HostWindow::SetFullscreen(
578 std::optional<FlutterEngineDisplayId> display_id) {
579 if (fullscreen == GetFullscreen()) {
584 WINDOWINFO window_info = {.cbSize =
sizeof(WINDOWINFO)};
585 GetWindowInfo(window_handle_, &window_info);
586 saved_window_info_.style = window_info.dwStyle;
587 saved_window_info_.ex_style = window_info.dwExStyle;
590 ::GetWindowRect(window_handle_, &saved_window_info_.rect);
591 saved_window_info_.client_size = GetWindowContentSize(window_handle_);
593 saved_window_info_.monitor =
594 MonitorFromWindow(window_handle_, MONITOR_DEFAULTTONEAREST);
595 saved_window_info_.monitor_info.cbSize =
596 sizeof(saved_window_info_.monitor_info);
597 GetMonitorInfo(saved_window_info_.monitor,
598 &saved_window_info_.monitor_info);
604 MonitorFromWindow(window_handle_, MONITOR_DEFAULTTONEAREST);
606 if (
auto const display =
607 engine_->display_manager()->FindById(display_id.value())) {
608 monitor =
reinterpret_cast<HMONITOR
>(display->display_id);
612 MONITORINFO monitor_info;
613 monitor_info.cbSize =
sizeof(monitor_info);
614 if (!GetMonitorInfo(monitor, &monitor_info)) {
615 FML_LOG(ERROR) <<
"Cannot set window fullscreen because the monitor info "
619 auto const width =
RectWidth(monitor_info.rcMonitor);
620 auto const height =
RectHeight(monitor_info.rcMonitor);
621 WINDOWINFO window_info = {.cbSize =
sizeof(WINDOWINFO)};
622 GetWindowInfo(window_handle_, &window_info);
625 SetWindowLong(window_handle_, GWL_STYLE,
626 saved_window_info_.style & ~(WS_CAPTION | WS_THICKFRAME));
628 window_handle_, GWL_EXSTYLE,
629 saved_window_info_.ex_style & ~(WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE |
630 WS_EX_CLIENTEDGE | WS_EX_STATICEDGE));
635 SetWindowPos(window_handle_, NULL, 0, 0, 0, 0,
636 SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED);
638 SetWindowPos(window_handle_,
nullptr, monitor_info.rcMonitor.left,
639 monitor_info.rcMonitor.top, width, height,
640 SWP_NOZORDER | SWP_NOACTIVATE | SWP_FRAMECHANGED);
646 SetWindowLong(window_handle_, GWL_STYLE,
647 saved_window_info_.style | WS_VISIBLE);
648 SetWindowLong(window_handle_, GWL_EXSTYLE, saved_window_info_.ex_style);
653 SetWindowPos(window_handle_, NULL, 0, 0, 0, 0,
654 SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED);
657 MonitorFromRect(&saved_window_info_.rect, MONITOR_DEFAULTTONEAREST);
658 MONITORINFO monitor_info;
659 monitor_info.cbSize =
sizeof(monitor_info);
660 GetMonitorInfo(monitor, &monitor_info);
662 auto window_rect = saved_window_info_.rect;
666 if (monitor != saved_window_info_.monitor ||
668 monitor_info.rcWork)) {
669 window_rect = AdjustToFit(monitor_info.rcWork, window_rect);
673 SetWindowPos(window_handle_,
nullptr, window_rect.left, window_rect.top,
675 SWP_NOZORDER | SWP_NOACTIVATE | SWP_FRAMECHANGED);
677 if (final_dpi != saved_window_info_.dpi || final_dpi != fullscreen_dpi) {
685 if (final_dpi != saved_window_info_.dpi) {
687 final_dpi /
static_cast<float>(saved_window_info_.dpi);
688 auto const width =
static_cast<LONG
>(scale *
RectWidth(window_rect));
689 auto const height =
static_cast<LONG
>(scale *
RectHeight(window_rect));
690 window_rect.right = window_rect.left + width;
691 window_rect.bottom = window_rect.top + height;
692 window_rect = AdjustToFit(monitor_info.rcWork, window_rect);
695 SetWindowPos(window_handle_,
nullptr, window_rect.left, window_rect.top,
697 SWP_NOZORDER | SWP_NOACTIVATE | SWP_FRAMECHANGED);
701 if (!task_bar_list_) {
703 ::CoCreateInstance(CLSID_TaskbarList,
nullptr, CLSCTX_INPROC_SERVER,
704 IID_PPV_ARGS(&task_bar_list_));
705 if (SUCCEEDED(hr) && FAILED(task_bar_list_->HrInit())) {
706 task_bar_list_ =
nullptr;
715 if (task_bar_list_) {
716 task_bar_list_->MarkFullscreenWindow(window_handle_, !!fullscreen);
719 is_fullscreen_ = fullscreen;
722 bool HostWindow::GetFullscreen()
const {
723 return is_fullscreen_;
728 GetClientRect(hwnd, &rect);
730 static_cast<double>(USER_DEFAULT_SCREEN_DPI);
731 double const width = rect.right / dpr;
732 double const height = rect.bottom / dpr;
734 .width = rect.right / dpr,
735 .height = rect.bottom / dpr,
739 std::optional<Size> HostWindow::GetWindowSizeForClientSize(
741 Size
const& client_size,
742 std::optional<Size> smallest,
743 std::optional<Size> biggest,
745 DWORD extended_window_style,
746 std::optional<HWND>
const& owner_hwnd) {
747 UINT
const dpi =
GetDpiForHWND(owner_hwnd ? *owner_hwnd :
nullptr);
748 double const scale_factor =
749 static_cast<double>(dpi) / USER_DEFAULT_SCREEN_DPI;
751 .right =
static_cast<LONG
>(client_size.width() * scale_factor),
752 .bottom =
static_cast<LONG
>(client_size.height() * scale_factor)};
755 extended_window_style, dpi)) {
756 FML_LOG(ERROR) <<
"Failed to run AdjustWindowRectExForDpi: "
757 << GetLastErrorAsString();
761 double width =
static_cast<double>(rect.right - rect.left);
762 double height =
static_cast<double>(rect.bottom - rect.top);
765 double const non_client_width = width - (client_size.width() * scale_factor);
766 double const non_client_height =
767 height - (client_size.height() * scale_factor);
769 flutter::Size min_physical_size = ClampToVirtualScreen(
770 flutter::Size(smallest->width() * scale_factor + non_client_width,
771 smallest->height() * scale_factor + non_client_height));
772 width = std::max(width, min_physical_size.width());
773 height = std::max(height, min_physical_size.height());
776 flutter::Size max_physical_size = ClampToVirtualScreen(
777 flutter::Size(biggest->width() * scale_factor + non_client_width,
778 biggest->height() * scale_factor + non_client_height));
779 width = std::min(width, max_physical_size.width());
780 height = std::min(height, max_physical_size.height());
783 return flutter::Size{width, height};
786 void HostWindow::EnableRecursively(
bool enable) {
787 EnableWindow(window_handle_, enable);
789 for (
HostWindow*
const owned : GetOwnedWindows()) {
790 owned->EnableRecursively(enable);
795 if (IsWindowEnabled(window_handle_)) {
799 for (
HostWindow*
const owned : GetOwnedWindows()) {
808 std::vector<HostWindow*> HostWindow::GetOwnedWindows()
const {
809 std::vector<HostWindow*> owned_windows;
811 HWND owner_window_handle;
812 std::vector<HostWindow*>* owned_windows;
813 } data{window_handle_, &owned_windows};
816 [](HWND hwnd, LPARAM lparam) -> BOOL {
817 auto*
const data =
reinterpret_cast<EnumData*
>(lparam);
818 if (GetWindow(hwnd, GW_OWNER) == data->owner_window_handle) {
819 HostWindow*
const window = GetThisFromHandle(hwnd);
821 data->owned_windows->push_back(window);
826 reinterpret_cast<LPARAM
>(&data));
828 return owned_windows;
832 if (HWND
const owner_window_handle = GetWindow(GetWindowHandle(), GW_OWNER)) {
833 return GetThisFromHandle(owner_window_handle);
838 void HostWindow::DisableRecursively() {
840 EnableWindow(window_handle_,
false);
842 for (
HostWindow*
const owned : GetOwnedWindows()) {
843 owned->DisableRecursively();
847 void HostWindow::UpdateModalStateLayer() {
848 auto children = GetOwnedWindows();
849 if (children.empty()) {
851 EnableWindow(window_handle_,
true);
854 EnableWindow(window_handle_,
false);
858 auto latest_child = *std::max_element(
860 return a->view_controller_->view()->view_id() <
861 b->view_controller_->view()->view_id();
865 if (child == latest_child) {
866 child->UpdateModalStateLayer();
868 child->DisableRecursively();
std::shared_ptr< WindowsProcTable > windows_proc_table()
void UpdateAccessibilityFeatures()
std::shared_ptr< DisplayManagerWin32 > display_manager()
std::unique_ptr< FlutterWindowsView > CreateView(std::unique_ptr< WindowBindingHandler > window, bool is_sized_to_content, const BoxConstraints &box_constraints, FlutterWindowsViewSizingDelegate *sizing_delegate=nullptr)
virtual bool running() const
HWND GetWindowHandle() const
void InitializeFlutterView(HostWindowInitializationParams const ¶ms)
std::unique_ptr< FlutterWindowsViewController > view_controller_
static LRESULT WndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)
static std::unique_ptr< HostWindow > CreateTooltipWindow(WindowManager *window_manager, FlutterWindowsEngine *engine, const WindowConstraints &preferred_constraints, GetWindowPositionCallback get_position_callback, HWND parent)
FlutterWindowsEngine * engine_
HostWindow(WindowManager *window_manager, FlutterWindowsEngine *engine)
static std::unique_ptr< HostWindow > CreateDialogWindow(WindowManager *window_manager, FlutterWindowsEngine *engine, const WindowSizeRequest &preferred_size, const WindowConstraints &preferred_constraints, LPCWSTR title, HWND parent)
static std::unique_ptr< HostWindow > CreateRegularWindow(WindowManager *window_manager, FlutterWindowsEngine *engine, const WindowSizeRequest &preferred_size, const WindowConstraints &preferred_constraints, LPCWSTR title)
HostWindow * FindFirstEnabledDescendant() const
virtual BOOL AdjustWindowRectExForDpi(LPRECT lpRect, DWORD dwStyle, BOOL bMenu, DWORD dwExStyle, UINT dpi) const
virtual BOOL EnableNonClientDpiScaling(HWND hwnd) const
virtual HRESULT DwmExtendFrameIntoClientArea(HWND hwnd, const MARGINS *pMarInset) const
virtual HRESULT DwmSetWindowAttribute(HWND hwnd, DWORD dwAttribute, LPCVOID pvAttribute, DWORD cbAttribute) const
virtual BOOL SetWindowCompositionAttribute(HWND hwnd, WINDOWCOMPOSITIONATTRIBDATA *data) const
UINT FlutterDesktopGetDpiForHWND(HWND hwnd)
#define DWMWA_USE_IMMERSIVE_DARK_MODE
union flutter::testing::@100::KeyboardChange::@0 content
WindowRect *(* GetWindowPositionCallback)(const WindowSize &child_size, const WindowRect &parent_rect, const WindowRect &output_rect)
UINT GetDpiForHWND(HWND hwnd)
LONG RectWidth(const RECT &r)
bool AreRectsEqual(const RECT &a, const RECT &b)
LONG RectHeight(const RECT &r)
DWORD extended_window_style
std::optional< HWND > const & owner_window
Rect const initial_window_rect
FlutterWindowsViewSizingDelegate * sizing_delegate
const BoxConstraints & box_constraints
bool has_view_constraints
double preferred_view_height
double preferred_view_width
bool has_preferred_view_size
WINDOWCOMPOSITIONATTRIB Attrib