Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
 
Loading...
Searching...
No Matches
flutter::HostWindowRegular Class Reference

#include <host_window_regular.h>

Inheritance diagram for flutter::HostWindowRegular:
flutter::HostWindowSized flutter::HostWindow flutter::FlutterWindowsViewSizingDelegate

Public Member Functions

 HostWindowRegular (WindowManager *window_manager, FlutterWindowsEngine *engine, const WindowSizeRequest &preferred_size, const BoxConstraints &constraints, LPCWSTR title, bool sized_to_content, bool resizable)
 
 ~HostWindowRegular () override
 
- Public Member Functions inherited from flutter::HostWindow
virtual ~HostWindow ()
 
HWND GetWindowHandle () const
 
HWND GetFlutterViewWindowHandle () const
 
void SetContentSize (const WindowSizeRequest &size)
 
void SetConstraints (const WindowConstraints &constraints)
 
virtual void SetFullscreen (bool fullscreen, std::optional< FlutterEngineDisplayId > display_id)
 
virtual bool GetFullscreen () const
 
HostWindowGetOwnerWindow () const
 
void UpdateModalStateLayer ()
 

Additional Inherited Members

- Static Public Member Functions inherited from flutter::HostWindow
static std::unique_ptr< HostWindowCreateRegularWindow (WindowManager *window_manager, FlutterWindowsEngine *engine, const WindowSizeRequest &preferred_size, const WindowConstraints &preferred_constraints, LPCWSTR title, bool sized_to_content, bool resizable)
 
static std::unique_ptr< HostWindowCreateDialogWindow (WindowManager *window_manager, FlutterWindowsEngine *engine, const WindowSizeRequest &preferred_size, const WindowConstraints &preferred_constraints, LPCWSTR title, HWND parent, bool sized_to_content, bool resizable)
 
static std::unique_ptr< HostWindowCreateTooltipWindow (WindowManager *window_manager, FlutterWindowsEngine *engine, const WindowConstraints &preferred_constraints, GetWindowPositionCallback get_position_callback, HWND parent)
 
static std::unique_ptr< HostWindowCreatePopupWindow (WindowManager *window_manager, FlutterWindowsEngine *engine, const WindowConstraints &preferred_constraints, GetWindowPositionCallback get_position_callback, HWND parent)
 
static HostWindowGetThisFromHandle (HWND hwnd)
 
static ActualWindowSize GetWindowContentSize (HWND hwnd)
 
- Protected Member Functions inherited from flutter::HostWindowSized
 HostWindowSized (WindowManager *window_manager, FlutterWindowsEngine *engine, bool resizable)
 
 ~HostWindowSized () override=0
 
FlutterWindowsViewSizingDelegateAsSizingDelegate ()
 
virtual void ApplyContentSize (int32_t physical_width, int32_t physical_height)
 
- Protected Member Functions inherited from flutter::HostWindow
void InitializeFlutterView (HostWindowInitializationParams const &params)
 
 HostWindow (WindowManager *window_manager, FlutterWindowsEngine *engine)
 
virtual LRESULT HandleMessage (HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)
 
void HandleWindowActivation (HWND hwnd, WPARAM wparam)
 
void EnableRecursively (bool enable)
 
HostWindowFindFirstEnabledDescendant () const
 
WindowArchetype GetArchetype () const
 
std::vector< HostWindow * > GetOwnedWindows () const
 
void DisableRecursively ()
 
 FML_DISALLOW_COPY_AND_ASSIGN (HostWindow)
 
- Static Protected Member Functions inherited from flutter::HostWindow
static std::optional< SizeGetWindowSizeForClientSize (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)
 
static void FocusRootViewOf (HostWindow *window)
 
static LRESULT WndProc (HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)
 
- Protected Attributes inherited from flutter::HostWindowSized
const bool resizable_
 
std::shared_ptr< int > view_alive_
 
int physical_width_ = 0
 
int physical_height_ = 0
 
- Protected Attributes inherited from flutter::HostWindow
friend WindowManager
 
WindowManager *const window_manager_ = nullptr
 
FlutterWindowsEngineengine_
 
std::unique_ptr< FlutterWindowsViewControllerview_controller_
 
WindowArchetype archetype_ = WindowArchetype::kRegular
 
HWND window_handle_
 
BoxConstraints box_constraints_
 
bool is_being_destroyed_ = false
 
bool is_fullscreen_ = false
 
SavedWindowInfo saved_window_info_
 
Microsoft::WRL::ComPtr< ITaskbarList2 > task_bar_list_
 

Detailed Description

Definition at line 11 of file host_window_regular.h.

Constructor & Destructor Documentation

◆ HostWindowRegular()

flutter::HostWindowRegular::HostWindowRegular ( WindowManager window_manager,
FlutterWindowsEngine engine,
const WindowSizeRequest preferred_size,
const BoxConstraints constraints,
LPCWSTR  title,
bool  sized_to_content,
bool  resizable 
)

Definition at line 28 of file host_window_regular.cc.

35 : HostWindowSized(window_manager, engine, resizable) {
36 FML_CHECK(sized_to_content || preferred_size.has_preferred_view_size);
37 DWORD const window_style = GetWindowStyleForRegular(resizable);
38 InitializeFlutterView(HostWindowInitializationParams{
39 .archetype = WindowArchetype::kRegular,
40 .window_style = window_style,
41 .extended_window_style = 0,
42 .box_constraints = constraints,
43 .initial_window_rect = GetInitialRect(engine, preferred_size, constraints,
44 sized_to_content, resizable),
45 .title = title,
46 .owner_window = std::optional<HWND>(),
47 .sizing_delegate = sized_to_content ? AsSizingDelegate() : nullptr,
48 .is_sized_to_content = sized_to_content,
49 });
50}
void InitializeFlutterView(HostWindowInitializationParams const &params)
HostWindowSized(WindowManager *window_manager, FlutterWindowsEngine *engine, bool resizable)
FlutterWindowsViewSizingDelegate * AsSizingDelegate()
FlutterEngine engine
Definition main.cc:84
G_BEGIN_DECLS gboolean sized_to_content
#define FML_CHECK(condition)
Definition logging.h:104
unsigned long DWORD

References flutter::HostWindow::HostWindowInitializationParams::archetype, flutter::HostWindowSized::AsSizingDelegate(), engine, FML_CHECK, flutter::WindowSizeRequest::has_preferred_view_size, flutter::HostWindow::InitializeFlutterView(), flutter::kRegular, and sized_to_content.

◆ ~HostWindowRegular()

flutter::HostWindowRegular::~HostWindowRegular ( )
override

Definition at line 52 of file host_window_regular.cc.

52 {
53 // Reset the view while this most-derived object is still fully alive, to stop
54 // the raster thread from sizing it before any subobject is torn down. See the
55 // destructor comment in host_window_sized.h for the rationale.
56 view_controller_.reset();
57}
std::unique_ptr< FlutterWindowsViewController > view_controller_

References flutter::HostWindow::view_controller_.


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