Flutter Engine
 
Loading...
Searching...
No Matches
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

namespace  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 {
134 return engine->window_manager()->CreateDialogWindow(request);
135}
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_CreateRegularWindow()

◆ InternalFlutterWindows_WindowManager_GetFullscreen()

FLUTTER_EXPORT bool InternalFlutterWindows_WindowManager_GetFullscreen ( HWND  hwnd)

Definition at line 186 of file window_manager.cc.

186 {
188 if (window) {
189 return window->GetFullscreen();
190 }
191
192 return false;
193}
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()

FLUTTER_EXPORT HWND InternalFlutterWindows_WindowManager_GetTopLevelWindowHandle ( int64_t  engine_id,
FlutterViewId  view_id 
)

◆ InternalFlutterWindows_WindowManager_GetWindowContentSize()

◆ 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 {
117 engine->window_manager()->Initialize(request);
118}

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

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 {
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}
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()

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

Definition at line 164 of file window_manager.cc.

166 {
168 if (window) {
169 window->SetConstraints(*constraints);
170 }
171}

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

Referenced by flutter::testing::TEST_F(), flutter::testing::TEST_F(), and 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 {
159 if (window) {
160 window->SetContentSize(*size);
161 }
162}

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

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