| 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::WindowCreationRequest
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 bool | InternalFlutterWindows_WindowManager_HasTopLevelWindows (int64_t engine_id)
FLUTTER_EXPORT FlutterViewId | InternalFlutterWindows_WindowManager_CreateRegularWindow (int64_t engine_id, const flutter::WindowCreationRequest *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_CreateRegularWindow()

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

Definition at line 117 of file window_manager.cc.

119 {
120 flutter::FlutterWindowsEngine* engine =
121 flutter::FlutterWindowsEngine::GetEngineForId(engine_id);
122 return engine->window_manager()->CreateRegularWindow(request);
123 }
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::CreateRegularWindow
FlutterViewId CreateRegularWindow(const WindowCreationRequest *request)
Definition: window_manager.cc:34

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 174 of file window_manager.cc.

174 {
175 flutter::HostWindow* window = flutter::HostWindow::GetThisFromHandle(hwnd);
176 if (window) {
177 return window->GetFullscreen();
178 }
179
180 return false;
181 }
flutter::HostWindow
Definition: host_window.h:26
flutter::HostWindow::GetThisFromHandle
static HostWindow * GetThisFromHandle(HWND hwnd)
Definition: host_window.cc:396
flutter::HostWindow::GetFullscreen
bool GetFullscreen() const
Definition: host_window.cc:748

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 125 of file window_manager.cc.

127 {
128 flutter::FlutterWindowsEngine* engine =
129 flutter::FlutterWindowsEngine::GetEngineForId(engine_id);
130 flutter::FlutterWindowsView* view = engine->view(view_id);
131 if (view == nullptr) {
132 return nullptr;
133 } else {
134 return GetAncestor(view->GetWindowHandle(), GA_ROOT);
135 }
136 }
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 139 of file window_manager.cc.

139 {
140 return flutter::HostWindow::GetWindowContentSize(hwnd);
141 }
flutter::HostWindow::GetWindowContentSize
static ActualWindowSize GetWindowContentSize(HWND hwnd)
Definition: host_window.cc:752

References flutter::HostWindow::GetWindowContentSize().

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

## ◆ InternalFlutterWindows_WindowManager_HasTopLevelWindows()

FLUTTER_EXPORT bool InternalFlutterWindows_WindowManager_HasTopLevelWindows | ( | int64_t | engine_id | ) |

Definition at line 110 of file window_manager.cc.

111 {
112 flutter::FlutterWindowsEngine* engine =
113 flutter::FlutterWindowsEngine::GetEngineForId(engine_id);
114 return engine->window_manager()->HasTopLevelWindows();
115 }
flutter::WindowManager::HasTopLevelWindows
bool HasTopLevelWindows() const
Definition: window_manager.cc:30

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

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 102 of file window_manager.cc.

104 {
105 flutter::FlutterWindowsEngine* engine =
106 flutter::FlutterWindowsEngine::GetEngineForId(engine_id);
107 engine->window_manager()->Initialize(request);
108 }
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 161 of file window_manager.cc.

163 {
164 flutter::HostWindow* window = flutter::HostWindow::GetThisFromHandle(hwnd);
165 const std::optional<FlutterEngineDisplayId> display_id =
166 request->has_display_id
167 ? std::optional<FlutterEngineDisplayId>(request->display_id)
168 : std::nullopt;
169 if (window) {
170 window->SetFullscreen(request->fullscreen, display_id);
171 }
172 }
flutter::HostWindow::SetFullscreen
void SetFullscreen(bool fullscreen, std::optional< FlutterEngineDisplayId > display_id)
Definition: host_window.cc:602
flutter::FullscreenRequest::has_display_id
bool has_display_id
Definition: window_manager.h:71
flutter::FullscreenRequest::fullscreen
bool fullscreen
Definition: window_manager.h:70
flutter::FullscreenRequest::display_id
FlutterEngineDisplayId display_id
Definition: window_manager.h:72

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 152 of file window_manager.cc.

154 {
155 flutter::HostWindow* window = flutter::HostWindow::GetThisFromHandle(hwnd);
156 if (window) {
157 window->SetConstraints(*constraints);
158 }
159 }
flutter::HostWindow::SetConstraints
void SetConstraints(const WindowConstraints &constraints)
Definition: host_window.cc:561

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 143 of file window_manager.cc.

145 {
146 flutter::HostWindow* window = flutter::HostWindow::GetThisFromHandle(hwnd);
147 if (window) {
148 window->SetContentSize(*size);
149 }
150 }
flutter::HostWindow::SetContentSize
void SetContentSize(const WindowSizeRequest &size)
Definition: host_window.cc:519

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

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