| Flutter Windows Embedder |

Classes | Namespaces | Functions
window_manager.h File Reference
`#include <windows.h>`
`#include <functional>`
`#include <optional>`
`#include <unordered_map>`
`#include <vector>`
`#include "flutter/shell/platform/common/public/flutter_export.h"`
`#include "flutter/fml/macros.h"`
`#include "flutter/shell/platform/common/isolate_scope.h"`
`#include "flutter/shell/platform/embedder/embedder.h"`

Go to the source code of this file.

## Classes
struct | flutter::WindowSizeRequest
struct | flutter::WindowConstraints
struct | flutter::RegularWindowCreationRequest
struct | flutter::DialogWindowCreationRequest
struct | flutter::WindowsMessage
struct | flutter::WindowingInitRequest
struct | flutter::ActualWindowSize
struct | flutter::FullscreenRequest
class | flutter::WindowManager

## Namespaces
| flutter

## Functions
FLUTTER_EXPORT void | InternalFlutterWindows_WindowManager_Initialize (int64_t engine_id, const flutter::WindowingInitRequest *request)
FLUTTER_EXPORT FlutterViewId | InternalFlutterWindows_WindowManager_CreateRegularWindow (int64_t engine_id, const flutter::RegularWindowCreationRequest *request)
FLUTTER_EXPORT FlutterViewId | InternalFlutterWindows_WindowManager_CreateDialogWindow (int64_t engine_id, const flutter::DialogWindowCreationRequest *request)
FLUTTER_EXPORT HWND | InternalFlutterWindows_WindowManager_GetTopLevelWindowHandle (int64_t engine_id, FlutterViewId view_id)
FLUTTER_EXPORT flutter::ActualWindowSize | InternalFlutterWindows_WindowManager_GetWindowContentSize (HWND hwnd)
FLUTTER_EXPORT void | InternalFlutterWindows_WindowManager_SetWindowSize (HWND hwnd, const flutter::WindowSizeRequest *size)
FLUTTER_EXPORT void | InternalFlutterWindows_WindowManager_SetWindowConstraints (HWND hwnd, const flutter::WindowConstraints *constraints)
FLUTTER_EXPORT void | InternalFlutterWindows_WindowManager_SetFullscreen (HWND hwnd, const flutter::FullscreenRequest *request)
FLUTTER_EXPORT bool | InternalFlutterWindows_WindowManager_GetFullscreen (HWND hwnd)

## Function Documentation

## ◆ InternalFlutterWindows_WindowManager_CreateDialogWindow()

FLUTTER_EXPORT FlutterViewId InternalFlutterWindows_WindowManager_CreateDialogWindow | ( | int64_t | engine_id,
|  | const flutter::DialogWindowCreationRequest * | request
| ) |  |

Definition at line 129 of file window_manager.cc.

131 {
132 flutter::FlutterWindowsEngine* engine =
133 flutter::FlutterWindowsEngine::GetEngineForId(engine_id);
134 return engine->window_manager()->CreateDialogWindow(request);
135 }
flutter::FlutterWindowsEngine
Definition: flutter_windows_engine.h:92
flutter::FlutterWindowsEngine::GetEngineForId
static FlutterWindowsEngine * GetEngineForId(int64_t engine_id)
Definition: flutter_windows_engine.cc:259
flutter::FlutterWindowsEngine::window_manager
WindowManager * window_manager()
Definition: flutter_windows_engine.h:327
flutter::WindowManager::CreateDialogWindow
FlutterViewId CreateDialogWindow(const DialogWindowCreationRequest *request)
Definition: window_manager.cc:44

References flutter::WindowManager::CreateDialogWindow(), flutter::FlutterWindowsEngine::GetEngineForId(), and flutter::FlutterWindowsEngine::window_manager().

Referenced by flutter::testing::TEST_F().

## ◆ InternalFlutterWindows_WindowManager_CreateRegularWindow()

FLUTTER_EXPORT FlutterViewId InternalFlutterWindows_WindowManager_CreateRegularWindow | ( | int64_t | engine_id,
|  | const flutter::RegularWindowCreationRequest * | request
| ) |  |

Definition at line 120 of file window_manager.cc.

122 {
123 flutter::FlutterWindowsEngine* engine =
124 flutter::FlutterWindowsEngine::GetEngineForId(engine_id);
125 return engine->window_manager()->CreateRegularWindow(request);
126 }
flutter::WindowManager::CreateRegularWindow
FlutterViewId CreateRegularWindow(const RegularWindowCreationRequest *request)
Definition: window_manager.cc:30

References flutter::WindowManager::CreateRegularWindow(), flutter::FlutterWindowsEngine::GetEngineForId(), and flutter::FlutterWindowsEngine::window_manager().

Referenced by flutter::testing::TEST_F().

## ◆ InternalFlutterWindows_WindowManager_GetFullscreen()

FLUTTER_EXPORT bool InternalFlutterWindows_WindowManager_GetFullscreen | ( | HWND | hwnd | ) |

Definition at line 186 of file window_manager.cc.

186 {
187 flutter::HostWindow* window = flutter::HostWindow::GetThisFromHandle(hwnd);
188 if (window) {
189 return window->GetFullscreen();
190 }
191
192 return false;
193 }
flutter::HostWindow
Definition: host_window.h:27
flutter::HostWindow::GetThisFromHandle
static HostWindow * GetThisFromHandle(HWND hwnd)
Definition: host_window.cc:327
flutter::HostWindow::GetFullscreen
virtual bool GetFullscreen() const
Definition: host_window.cc:708

References flutter::HostWindow::GetFullscreen(), and flutter::HostWindow::GetThisFromHandle().

Referenced by flutter::testing::TEST_F().

## ◆ InternalFlutterWindows_WindowManager_GetTopLevelWindowHandle()

FLUTTER_EXPORT HWND InternalFlutterWindows_WindowManager_GetTopLevelWindowHandle | ( | int64_t | engine_id,
|  | FlutterViewId | view_id
| ) |  |

Definition at line 137 of file window_manager.cc.

139 {
140 flutter::FlutterWindowsEngine* engine =
141 flutter::FlutterWindowsEngine::GetEngineForId(engine_id);
142 flutter::FlutterWindowsView* view = engine->view(view_id);
143 if (view == nullptr) {
144 return nullptr;
145 } else {
146 return GetAncestor(view->GetWindowHandle(), GA_ROOT);
147 }
148 }
flutter::FlutterWindowsEngine::view
FlutterWindowsView * view(FlutterViewId view_id) const
Definition: flutter_windows_engine.cc:688
flutter::FlutterWindowsView
Definition: flutter_windows_view.h:34
flutter::FlutterWindowsView::GetWindowHandle
virtual HWND GetWindowHandle() const
Definition: flutter_windows_view.cc:780

References flutter::FlutterWindowsEngine::GetEngineForId(), flutter::FlutterWindowsView::GetWindowHandle(), and flutter::FlutterWindowsEngine::view().

Referenced by flutter::testing::TEST_F().

## ◆ InternalFlutterWindows_WindowManager_GetWindowContentSize()

FLUTTER_EXPORT flutter::ActualWindowSize InternalFlutterWindows_WindowManager_GetWindowContentSize | ( | HWND | hwnd | ) |

Definition at line 151 of file window_manager.cc.

151 {
152 return flutter::HostWindow::GetWindowContentSize(hwnd);
153 }
flutter::HostWindow::GetWindowContentSize
static ActualWindowSize GetWindowContentSize(HWND hwnd)
Definition: host_window.cc:712

References flutter::HostWindow::GetWindowContentSize().

Referenced by flutter::testing::TEST_F().

## ◆ InternalFlutterWindows_WindowManager_Initialize()

FLUTTER_EXPORT void InternalFlutterWindows_WindowManager_Initialize | ( | int64_t | engine_id,
|  | const flutter::WindowingInitRequest * | request
| ) |  |

Definition at line 112 of file window_manager.cc.

114 {
115 flutter::FlutterWindowsEngine* engine =
116 flutter::FlutterWindowsEngine::GetEngineForId(engine_id);
117 engine->window_manager()->Initialize(request);
118 }
flutter::WindowManager::Initialize
void Initialize(const WindowingInitRequest *request)
Definition: window_manager.cc:25

References flutter::FlutterWindowsEngine::GetEngineForId(), flutter::WindowManager::Initialize(), and flutter::FlutterWindowsEngine::window_manager().

Referenced by flutter::testing::TEST_F().

## ◆ InternalFlutterWindows_WindowManager_SetFullscreen()

FLUTTER_EXPORT void InternalFlutterWindows_WindowManager_SetFullscreen | ( | HWND | hwnd,
|  | const flutter::FullscreenRequest * | request
| ) |  |

Definition at line 173 of file window_manager.cc.

175 {
176 flutter::HostWindow* window = flutter::HostWindow::GetThisFromHandle(hwnd);
177 const std::optional<FlutterEngineDisplayId> display_id =
178 request->has_display_id
179 ? std::optional<FlutterEngineDisplayId>(request->display_id)
180 : std::nullopt;
181 if (window) {
182 window->SetFullscreen(request->fullscreen, display_id);
183 }
184 }
flutter::HostWindow::SetFullscreen
virtual void SetFullscreen(bool fullscreen, std::optional< FlutterEngineDisplayId > display_id)
Definition: host_window.cc:562
flutter::FullscreenRequest::has_display_id
bool has_display_id
Definition: window_manager.h:78
flutter::FullscreenRequest::fullscreen
bool fullscreen
Definition: window_manager.h:77
flutter::FullscreenRequest::display_id
FlutterEngineDisplayId display_id
Definition: window_manager.h:79

References flutter::FullscreenRequest::display_id, flutter::FullscreenRequest::fullscreen, flutter::HostWindow::GetThisFromHandle(), flutter::FullscreenRequest::has_display_id, and flutter::HostWindow::SetFullscreen().

Referenced by flutter::testing::TEST_F().

## ◆ InternalFlutterWindows_WindowManager_SetWindowConstraints()

FLUTTER_EXPORT void InternalFlutterWindows_WindowManager_SetWindowConstraints | ( | HWND | hwnd,
|  | const flutter::WindowConstraints * | constraints
| ) |  |

Definition at line 164 of file window_manager.cc.

166 {
167 flutter::HostWindow* window = flutter::HostWindow::GetThisFromHandle(hwnd);
168 if (window) {
169 window->SetConstraints(*constraints);
170 }
171 }
flutter::HostWindow::SetConstraints
void SetConstraints(const WindowConstraints &constraints)
Definition: host_window.cc:521

References flutter::HostWindow::GetThisFromHandle(), and flutter::HostWindow::SetConstraints().

Referenced by flutter::testing::TEST_F().

## ◆ InternalFlutterWindows_WindowManager_SetWindowSize()

FLUTTER_EXPORT void InternalFlutterWindows_WindowManager_SetWindowSize | ( | HWND | hwnd,
|  | const flutter::WindowSizeRequest * | size
| ) |  |

Definition at line 155 of file window_manager.cc.

157 {
158 flutter::HostWindow* window = flutter::HostWindow::GetThisFromHandle(hwnd);
159 if (window) {
160 window->SetContentSize(*size);
161 }
162 }
flutter::HostWindow::SetContentSize
void SetContentSize(const WindowSizeRequest &size)
Definition: host_window.cc:479

References flutter::HostWindow::GetThisFromHandle(), and flutter::HostWindow::SetContentSize().

Referenced by flutter::testing::TEST_F().