16 resizable_(resizable),
17 view_alive_(
std::make_shared<int>(0)) {}
19void HostWindowSized::DidUpdateViewSize(int32_t
width, int32_t
height) {
23 auto const view_alive = weak_view_alive.lock();
36 WINDOWINFO window_info = {.cbSize =
sizeof(WINDOWINFO)};
41 double const scale =
static_cast<double>(dpi > 0 ? dpi : 96) / 96.0;
45 window_info.dwStyle, window_info.dwExStyle,
nullptr);
52 window_size->height(),
53 SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
63WindowRect HostWindowSized::GetWorkArea()
const {
64 constexpr int32_t kDefaultWorkAreaSize = 10000;
65 WindowRect work_area = {0, 0, kDefaultWorkAreaSize, kDefaultWorkAreaSize};
66 HMONITOR
const monitor =
69 MONITORINFO monitor_info = {};
70 monitor_info.cbSize =
sizeof(monitor_info);
71 if (GetMonitorInfo(monitor, &monitor_info)) {
72 work_area.left = monitor_info.rcWork.left;
73 work_area.top = monitor_info.rcWork.top;
74 work_area.width = monitor_info.rcWork.right - monitor_info.rcWork.left;
75 work_area.height = monitor_info.rcWork.bottom - monitor_info.rcWork.top;
std::shared_ptr< WindowsProcTable > windows_proc_table()
TaskRunner * task_runner()
BoxConstraints box_constraints_
std::unique_ptr< FlutterWindowsViewController > view_controller_
FlutterWindowsEngine * engine_
static std::optional< Size > GetWindowSizeForClientSize(WindowsProcTable const &win32, Size const &client_size, std::optional< Size > smallest, std::optional< Size > biggest, DWORD window_style, DWORD extended_window_style, std::optional< HWND > const &owner_hwnd)
std::shared_ptr< int > view_alive_
HostWindowSized(WindowManager *window_manager, FlutterWindowsEngine *engine, bool resizable)
void PostTask(TaskClosure task)
UINT GetDpiForHWND(HWND hwnd)