17DWORD GetWindowStyleForRegular(
bool resizable) {
18 DWORD style = WS_OVERLAPPEDWINDOW;
20 style &= ~(WS_THICKFRAME | WS_MAXIMIZEBOX);
32 bool sized_to_content,
36 DWORD const window_style = GetWindowStyleForRegular(resizable);
39 .window_style = window_style,
40 .extended_window_style = 0,
41 .box_constraints = constraints,
42 .initial_window_rect = GetInitialRect(
engine, preferred_size, constraints,
43 sized_to_content, resizable),
45 .owner_window = std::optional<HWND>(),
47 .is_sized_to_content = sized_to_content,
54 bool sized_to_content,
58 if (sized_to_content) {
68 std::optional<Size>
const window_size =
70 *
engine->windows_proc_table(),
Size(client_width, client_height),
72 GetWindowStyleForRegular(resizable), 0,
nullptr);
73 return {{CW_USEDEFAULT, CW_USEDEFAULT},
74 window_size ? *window_size :
Size{CW_USEDEFAULT, CW_USEDEFAULT}};
void InitializeFlutterView(HostWindowInitializationParams const ¶ms)
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)
HostWindowRegular(WindowManager *window_manager, FlutterWindowsEngine *engine, const WindowSizeRequest &preferred_size, const BoxConstraints &constraints, LPCWSTR title, bool sized_to_content, bool resizable)
FlutterWindowsViewSizingDelegate * AsSizingDelegate()
#define FML_CHECK(condition)
WindowArchetype archetype
double preferred_view_height
double preferred_view_width
bool has_preferred_view_size