Flutter Windows Embedder
host_window_regular.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_HOST_WINDOW_REGULAR_H_
6 #define FLUTTER_SHELL_PLATFORM_WINDOWS_HOST_WINDOW_REGULAR_H_
7 
8 #include "host_window_sized.h"
9 
10 namespace flutter {
12  public:
13  // Creates a regular window.
14  //
15  // If |sized_to_content| is true, the window is initially sized to the
16  // minimum of |constraints|. The window will automatically resize to its
17  // rendered content after each frame. If |resizable| is false, the window
18  // will continue to track content size after the initial sizing and its
19  // resize border is removed. If |resizable| is true, the user may resize the
20  // window manually after the initial content-based sizing.
21  //
22  // If |sized_to_content| is false, the window is created with the size
23  // specified in |preferred_size|.
24  HostWindowRegular(WindowManager* window_manager,
25  FlutterWindowsEngine* engine,
26  const WindowSizeRequest& preferred_size,
27  const BoxConstraints& constraints,
28  LPCWSTR title,
29  bool sized_to_content,
30  bool resizable);
31 
32  ~HostWindowRegular() override;
33 
34  private:
35  static Rect GetInitialRect(FlutterWindowsEngine* engine,
36  const WindowSizeRequest& preferred_size,
37  const BoxConstraints& constraints,
38  bool sized_to_content,
39  bool resizable);
40 };
41 } // namespace flutter
42 
43 #endif // FLUTTER_SHELL_PLATFORM_WINDOWS_HOST_WINDOW_REGULAR_H_
HostWindowRegular(WindowManager *window_manager, FlutterWindowsEngine *engine, const WindowSizeRequest &preferred_size, const BoxConstraints &constraints, LPCWSTR title, bool sized_to_content, bool resizable)