Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
 
Loading...
Searching...
No Matches
window_manager.cc File Reference

Go to the source code of this file.

Namespaces

namespace  flutter
 

Functions

void InternalFlutterWindows_WindowManager_Initialize (int64_t engine_id, const flutter::WindowingInitRequest *request)
 
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 FlutterViewId InternalFlutterWindows_WindowManager_CreateTooltipWindow (int64_t engine_id, const flutter::TooltipWindowCreationRequest *request)
 
FLUTTER_EXPORT FlutterViewId InternalFlutterWindows_WindowManager_CreatePopupWindow (int64_t engine_id, const flutter::PopupWindowCreationRequest *request)
 
HWND InternalFlutterWindows_WindowManager_GetTopLevelWindowHandle (int64_t engine_id, FlutterViewId view_id)
 
flutter::ActualWindowSize InternalFlutterWindows_WindowManager_GetWindowContentSize (HWND hwnd)
 
void InternalFlutterWindows_WindowManager_SetWindowSize (HWND hwnd, const flutter::WindowSizeRequest *size)
 
void InternalFlutterWindows_WindowManager_OnDestroyWindow (HWND hwnd)
 
void InternalFlutterWindows_WindowManager_SetWindowConstraints (HWND hwnd, const flutter::WindowConstraints *constraints)
 
void InternalFlutterWindows_WindowManager_SetFullscreen (HWND hwnd, const flutter::FullscreenRequest *request)
 
bool InternalFlutterWindows_WindowManager_GetFullscreen (HWND hwnd)
 
FLUTTER_EXPORT void InternalFlutterWindows_WindowManager_UpdateTooltipPosition (HWND hwnd)
 
FLUTTER_EXPORT void InternalFlutterWindows_WindowManager_UpdatePopupPosition (HWND hwnd)
 

Function Documentation

◆ InternalFlutterWindows_WindowManager_CreateDialogWindow()

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

Definition at line 163 of file window_manager.cc.

165 {
168 return engine->window_manager()->CreateDialogWindow(request);
169}
static FlutterWindowsEngine * GetEngineForId(int64_t engine_id)
FlutterEngine engine
Definition main.cc:84

References engine, and flutter::FlutterWindowsEngine::GetEngineForId().

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

◆ InternalFlutterWindows_WindowManager_CreatePopupWindow()

FLUTTER_EXPORT FlutterViewId InternalFlutterWindows_WindowManager_CreatePopupWindow ( int64_t  engine_id,
const flutter::PopupWindowCreationRequest request 
)

◆ InternalFlutterWindows_WindowManager_CreateRegularWindow()

◆ InternalFlutterWindows_WindowManager_CreateTooltipWindow()

FLUTTER_EXPORT FlutterViewId InternalFlutterWindows_WindowManager_CreateTooltipWindow ( int64_t  engine_id,
const flutter::TooltipWindowCreationRequest request 
)

◆ InternalFlutterWindows_WindowManager_GetFullscreen()

bool InternalFlutterWindows_WindowManager_GetFullscreen ( HWND  hwnd)

Definition at line 258 of file window_manager.cc.

258 {
260 if (window) {
261 return window->GetFullscreen();
262 }
263
264 return false;
265}
static HostWindow * GetThisFromHandle(HWND hwnd)
GLFWwindow * window
Definition main.cc:60

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

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

◆ InternalFlutterWindows_WindowManager_GetTopLevelWindowHandle()

◆ InternalFlutterWindows_WindowManager_GetWindowContentSize()

◆ InternalFlutterWindows_WindowManager_Initialize()

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

Definition at line 146 of file window_manager.cc.

148 {
151 engine->window_manager()->Initialize(request);
152}

References engine, and flutter::FlutterWindowsEngine::GetEngineForId().

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

◆ InternalFlutterWindows_WindowManager_OnDestroyWindow()

void InternalFlutterWindows_WindowManager_OnDestroyWindow ( HWND  hwnd)

Definition at line 216 of file window_manager.cc.

216 {
218 HWND flutter_view_handle = nullptr;
219 if (window) {
220 // First reparent the FlutterView to null parent. Otherwise destroying
221 // the window HWND will immediately destroy the FlutterView HWND as well,
222 // which will cause crash when raster thread tries to reallocate surface.
223 // The FlutterView may only be destroyed safely when
224 // FlutterWindowsEngine::RemoveView finishes.
225 flutter_view_handle = window->GetFlutterViewWindowHandle();
226 ShowWindow(flutter_view_handle, SW_HIDE);
227 SetParent(flutter_view_handle, nullptr);
228 }
229 DestroyWindow(hwnd);
230 if (flutter_view_handle) {
231 // Now the flutter view HWND can be destroyed safely.
232 DestroyWindow(flutter_view_handle);
233 }
234}

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

Referenced by flutter::WindowManager::OnEngineShutdown().

◆ InternalFlutterWindows_WindowManager_SetFullscreen()

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

Definition at line 245 of file window_manager.cc.

247 {
249 const std::optional<FlutterEngineDisplayId> display_id =
250 request->has_display_id
251 ? std::optional<FlutterEngineDisplayId>(request->display_id)
252 : std::nullopt;
253 if (window) {
254 window->SetFullscreen(request->fullscreen, display_id);
255 }
256}
Definition ref_ptr.h:261
FlutterEngineDisplayId display_id

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

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

◆ InternalFlutterWindows_WindowManager_SetWindowConstraints()

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

Definition at line 236 of file window_manager.cc.

238 {
240 if (window) {
241 window->SetConstraints(*constraints);
242 }
243}

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

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

◆ InternalFlutterWindows_WindowManager_SetWindowSize()

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

Definition at line 207 of file window_manager.cc.

209 {
211 if (window) {
212 window->SetContentSize(*size);
213 }
214}

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

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

◆ InternalFlutterWindows_WindowManager_UpdatePopupPosition()

FLUTTER_EXPORT void InternalFlutterWindows_WindowManager_UpdatePopupPosition ( HWND  hwnd)

◆ InternalFlutterWindows_WindowManager_UpdateTooltipPosition()

FLUTTER_EXPORT void InternalFlutterWindows_WindowManager_UpdateTooltipPosition ( HWND  hwnd)