| Flutter Windows Embedder |

Functions
flutter_windows.cc File Reference
`#include "flutter/shell/platform/windows/public/flutter_windows.h"`
`#include <io.h>`
`#include <algorithm>`
`#include <chrono>`
`#include <cstdlib>`
`#include <filesystem>`
`#include <memory>`
`#include <vector>`
`#include "flutter/shell/platform/common/client_wrapper/include/flutter/plugin_registrar.h"`
`#include "flutter/shell/platform/common/incoming_message_dispatcher.h"`
`#include "flutter/shell/platform/common/path_utils.h"`
`#include "flutter/shell/platform/embedder/embedder.h"`
`#include "flutter/shell/platform/windows/dpi_utils.h"`
`#include "flutter/shell/platform/windows/flutter_project_bundle.h"`
`#include "flutter/shell/platform/windows/flutter_window.h"`
`#include "flutter/shell/platform/windows/flutter_windows_engine.h"`
`#include "flutter/shell/platform/windows/flutter_windows_view.h"`
`#include "flutter/shell/platform/windows/flutter_windows_view_controller.h"`
`#include "flutter/shell/platform/windows/window_binding_handler.h"`
`#include "flutter/shell/platform/windows/window_state.h"`

Go to the source code of this file.

## Functions
static flutter::FlutterWindowsEngine * | EngineFromHandle (FlutterDesktopEngineRef ref)
static FlutterDesktopEngineRef | HandleForEngine (flutter::FlutterWindowsEngine *engine)
static flutter::FlutterWindowsViewController * | ViewControllerFromHandle (FlutterDesktopViewControllerRef ref)
static FlutterDesktopViewControllerRef | HandleForViewController (flutter::FlutterWindowsViewController *view_controller)
static flutter::FlutterWindowsView * | ViewFromHandle (FlutterDesktopViewRef ref)
static FlutterDesktopViewRef | HandleForView (flutter::FlutterWindowsView *view)
static flutter::FlutterWindowsTextureRegistrar * | TextureRegistrarFromHandle (FlutterDesktopTextureRegistrarRef ref)
static FlutterDesktopTextureRegistrarRef | HandleForTextureRegistrar (flutter::FlutterWindowsTextureRegistrar *registrar)
static FlutterDesktopViewControllerRef | CreateViewController (FlutterDesktopEngineRef engine_ref, int width, int height, bool owns_engine)
FlutterDesktopViewControllerRef | FlutterDesktopViewControllerCreate (int width, int height, FlutterDesktopEngineRef engine)
FlutterDesktopViewControllerRef | FlutterDesktopEngineCreateViewController (FlutterDesktopEngineRef engine, const FlutterDesktopViewControllerProperties *properties)
void | FlutterDesktopViewControllerDestroy (FlutterDesktopViewControllerRef ref)
FlutterDesktopViewId | FlutterDesktopViewControllerGetViewId (FlutterDesktopViewControllerRef ref)
FlutterDesktopEngineRef | FlutterDesktopViewControllerGetEngine (FlutterDesktopViewControllerRef ref)
FlutterDesktopViewRef | FlutterDesktopViewControllerGetView (FlutterDesktopViewControllerRef ref)
void | FlutterDesktopViewControllerForceRedraw (FlutterDesktopViewControllerRef ref)
bool | FlutterDesktopViewControllerHandleTopLevelWindowProc (FlutterDesktopViewControllerRef ref, HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam, LRESULT *result)
FlutterDesktopEngineRef | FlutterDesktopEngineCreate (const FlutterDesktopEngineProperties *engine_properties)
bool | FlutterDesktopEngineDestroy (FlutterDesktopEngineRef engine_ref)
FLUTTER_EXPORT FlutterDesktopEngineRef | FlutterDesktopEngineForId (int64_t engine_id)
bool | FlutterDesktopEngineRun (FlutterDesktopEngineRef engine, const char *entry_point)
uint64_t | FlutterDesktopEngineProcessMessages (FlutterDesktopEngineRef engine)
void | FlutterDesktopEngineReloadSystemFonts (FlutterDesktopEngineRef engine)
FlutterDesktopPluginRegistrarRef | FlutterDesktopEngineGetPluginRegistrar (FlutterDesktopEngineRef engine, const char *plugin_name)
FlutterDesktopMessengerRef | FlutterDesktopEngineGetMessenger (FlutterDesktopEngineRef engine)
FlutterDesktopTextureRegistrarRef | FlutterDesktopEngineGetTextureRegistrar (FlutterDesktopEngineRef engine)
void | FlutterDesktopEngineSetNextFrameCallback (FlutterDesktopEngineRef engine, VoidCallback callback, void *user_data)
HWND | FlutterDesktopViewGetHWND (FlutterDesktopViewRef view)
IDXGIAdapter * | FlutterDesktopViewGetGraphicsAdapter (FlutterDesktopViewRef view)
IDXGIAdapter * | FlutterDesktopEngineGetGraphicsAdapter (FlutterDesktopEngineRef engine)
bool | FlutterDesktopEngineProcessExternalWindowMessage (FlutterDesktopEngineRef engine, HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam, LRESULT *result)
void | FlutterDesktopEngineRegisterPlatformViewType (FlutterDesktopEngineRef engine, const char *view_type_name, FlutterPlatformViewTypeEntry view_type)
FlutterDesktopViewRef | FlutterDesktopPluginRegistrarGetView (FlutterDesktopPluginRegistrarRef registrar)
FlutterDesktopViewRef | FlutterDesktopPluginRegistrarGetViewById (FlutterDesktopPluginRegistrarRef registrar, FlutterDesktopViewId view_id)
void | FlutterDesktopPluginRegistrarRegisterTopLevelWindowProcDelegate (FlutterDesktopPluginRegistrarRef registrar, FlutterDesktopWindowProcCallback delegate, void *user_data)
void | FlutterDesktopPluginRegistrarUnregisterTopLevelWindowProcDelegate (FlutterDesktopPluginRegistrarRef registrar, FlutterDesktopWindowProcCallback delegate)
UINT | FlutterDesktopGetDpiForHWND (HWND hwnd)
UINT | FlutterDesktopGetDpiForMonitor (HMONITOR monitor)
void | FlutterDesktopResyncOutputStreams ()
FlutterDesktopMessengerRef | FlutterDesktopPluginRegistrarGetMessenger (FlutterDesktopPluginRegistrarRef registrar)
void | FlutterDesktopPluginRegistrarSetDestructionHandler (FlutterDesktopPluginRegistrarRef registrar, FlutterDesktopOnPluginRegistrarDestroyed callback)
bool | FlutterDesktopMessengerSendWithReply (FlutterDesktopMessengerRef messenger, const char *channel, const uint8_t *message, const size_t message_size, const FlutterDesktopBinaryReply reply, void *user_data)
bool | FlutterDesktopMessengerSend (FlutterDesktopMessengerRef messenger, const char *channel, const uint8_t *message, const size_t message_size)
void | FlutterDesktopMessengerSendResponse (FlutterDesktopMessengerRef messenger, const FlutterDesktopMessageResponseHandle *handle, const uint8_t *data, size_t data_length)
void | FlutterDesktopMessengerSetCallback (FlutterDesktopMessengerRef messenger, const char *channel, FlutterDesktopMessageCallback callback, void *user_data)
FlutterDesktopMessengerRef | FlutterDesktopMessengerAddRef (FlutterDesktopMessengerRef messenger)
void | FlutterDesktopMessengerRelease (FlutterDesktopMessengerRef messenger)
bool | FlutterDesktopMessengerIsAvailable (FlutterDesktopMessengerRef messenger)
FlutterDesktopMessengerRef | FlutterDesktopMessengerLock (FlutterDesktopMessengerRef messenger)
void | FlutterDesktopMessengerUnlock (FlutterDesktopMessengerRef messenger)
FlutterDesktopTextureRegistrarRef | FlutterDesktopRegistrarGetTextureRegistrar (FlutterDesktopPluginRegistrarRef registrar)
int64_t | FlutterDesktopTextureRegistrarRegisterExternalTexture (FlutterDesktopTextureRegistrarRef texture_registrar, const FlutterDesktopTextureInfo *texture_info)
void | FlutterDesktopTextureRegistrarUnregisterExternalTexture (FlutterDesktopTextureRegistrarRef texture_registrar, int64_t texture_id, void(*callback)(void *user_data), void *user_data)
bool | FlutterDesktopTextureRegistrarMarkExternalTextureFrameAvailable (FlutterDesktopTextureRegistrarRef texture_registrar, int64_t texture_id)

## Function Documentation

## ◆ CreateViewController()

static FlutterDesktopViewControllerRef CreateViewController | ( | FlutterDesktopEngineRef | engine_ref,
|  | int | width,
|  | int | height,
|  | bool | owns_engine
| ) |  |
| static

Definition at line 79 of file flutter_windows.cc.

83 {
84 flutter::FlutterWindowsEngine* engine_ptr = EngineFromHandle(engine_ref);
85 std::unique_ptr<flutter::WindowBindingHandler> window_wrapper =
86 std::make_unique<flutter::FlutterWindow>(
87 width, height, engine_ptr->display_manager(),
88 engine_ptr->windows_proc_table());
89
90 std::unique_ptr<flutter::FlutterWindowsEngine> engine;
91 if (owns_engine) {
92 engine = std::unique_ptr<flutter::FlutterWindowsEngine>(engine_ptr);
93 }
94
95 std::unique_ptr<flutter::FlutterWindowsView> view = engine_ptr->CreateView(
96 std::move(window_wrapper), false, flutter::BoxConstraints());
97 if (!view) {
98 return nullptr;
99 }
100
101 auto controller = std::make_unique<flutter::FlutterWindowsViewController>(
102 std::move(engine), std::move(view));
103
104 // Launch the engine if it is not running already.
105 if (!controller->engine()->running()) {
106 if (!controller->engine()->Run()) {
107 return nullptr;
108 }
109 }
110
111 // Must happen after engine is running.
112 controller->view()->SendInitialBounds();
113
114 // The Windows embedder listens to accessibility updates using the
115 // view's HWND. The embedder's accessibility features may be stale if
116 // the app was in headless mode.
117 controller->engine()->UpdateAccessibilityFeatures();
118
119 return HandleForViewController(controller.release());
120 }
flutter::FlutterWindowsEngine
Definition: flutter_windows_engine.h:92
flutter::FlutterWindowsEngine::windows_proc_table
std::shared_ptr< WindowsProcTable > windows_proc_table()
Definition: flutter_windows_engine.h:324
flutter::FlutterWindowsEngine::display_manager
std::shared_ptr< DisplayManagerWin32 > display_manager()
Definition: flutter_windows_engine.h:166
flutter::FlutterWindowsEngine::CreateView
std::unique_ptr< FlutterWindowsView > CreateView(std::unique_ptr< WindowBindingHandler > window, bool is_sized_to_content, const BoxConstraints &box_constraints, FlutterWindowsViewSizingDelegate *sizing_delegate=nullptr)
Definition: flutter_windows_engine.cc:526
EngineFromHandle
static flutter::FlutterWindowsEngine * EngineFromHandle(FlutterDesktopEngineRef ref)
Definition: flutter_windows.cc:32
HandleForViewController
static FlutterDesktopViewControllerRef HandleForViewController(flutter::FlutterWindowsViewController *view_controller)
Definition: flutter_windows.cc:48

References flutter::FlutterWindowsEngine::CreateView(), flutter::FlutterWindowsEngine::display_manager(), EngineFromHandle(), HandleForViewController(), and flutter::FlutterWindowsEngine::windows_proc_table().

Referenced by FlutterDesktopEngineCreateViewController(), and FlutterDesktopViewControllerCreate().

## ◆ EngineFromHandle()

static flutter::FlutterWindowsEngine* EngineFromHandle | ( | FlutterDesktopEngineRef | ref | ) |
| static

Definition at line 32 of file flutter_windows.cc.

33 {
34 return reinterpret_cast<flutter::FlutterWindowsEngine*>(ref);
35 }

Referenced by CreateViewController(), FlutterDesktopEngineDestroy(), FlutterDesktopEngineGetGraphicsAdapter(), FlutterDesktopEngineGetMessenger(), FlutterDesktopEngineGetPluginRegistrar(), FlutterDesktopEngineGetTextureRegistrar(), FlutterDesktopEngineProcessExternalWindowMessage(), FlutterDesktopEngineReloadSystemFonts(), FlutterDesktopEngineRun(), and FlutterDesktopEngineSetNextFrameCallback().

## ◆ FlutterDesktopEngineCreate()

FlutterDesktopEngineRef FlutterDesktopEngineCreate | ( | const FlutterDesktopEngineProperties * | engine_properties | ) |

Definition at line 184 of file flutter_windows.cc.

185 {
186 flutter::FlutterProjectBundle project(*engine_properties);
187 auto engine = std::make_unique<flutter::FlutterWindowsEngine>(project);
188 return HandleForEngine(engine.release());
189 }
flutter::FlutterProjectBundle
Definition: flutter_project_bundle.h:39
HandleForEngine
static FlutterDesktopEngineRef HandleForEngine(flutter::FlutterWindowsEngine *engine)
Definition: flutter_windows.cc:38

References HandleForEngine().

Referenced by flutter::FlutterEngine::FlutterEngine(), and flutter::testing::TEST().

## ◆ FlutterDesktopEngineCreateViewController()

FlutterDesktopViewControllerRef FlutterDesktopEngineCreateViewController | ( | FlutterDesktopEngineRef | engine,
|  | const FlutterDesktopViewControllerProperties * | properties
| ) |  |

Definition at line 129 of file flutter_windows.cc.

131 {
132 return CreateViewController(engine, properties->width, properties->height,
133 /*owns_engine=*/false);
134 }
CreateViewController
static FlutterDesktopViewControllerRef CreateViewController(FlutterDesktopEngineRef engine_ref, int width, int height, bool owns_engine)
Definition: flutter_windows.cc:79
FlutterDesktopViewControllerProperties::width
int width
Definition: flutter_windows_internal.h:20
FlutterDesktopViewControllerProperties::height
int height
Definition: flutter_windows_internal.h:23

References CreateViewController(), FlutterDesktopViewControllerProperties::height, and FlutterDesktopViewControllerProperties::width.

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

## ◆ FlutterDesktopEngineDestroy()

bool FlutterDesktopEngineDestroy | ( | FlutterDesktopEngineRef | engine_ref | ) |

Definition at line 191 of file flutter_windows.cc.

191 {
192 flutter::FlutterWindowsEngine* engine = EngineFromHandle(engine_ref);
193 bool result = true;
194 if (engine->running()) {
195 result = engine->Stop();
196 }
197 delete engine;
198 return result;
199 }
flutter::FlutterWindowsEngine::running
virtual bool running() const
Definition: flutter_windows_engine.h:125
flutter::FlutterWindowsEngine::Stop
virtual bool Stop()
Definition: flutter_windows_engine.cc:512

References EngineFromHandle(), flutter::FlutterWindowsEngine::running(), and flutter::FlutterWindowsEngine::Stop().

Referenced by flutter::FlutterEngine::ShutDown(), and flutter::testing::TEST().

## ◆ FlutterDesktopEngineForId()

FLUTTER_EXPORT FlutterDesktopEngineRef FlutterDesktopEngineForId | ( | int64_t | engine_id | ) |

Definition at line 202 of file flutter_windows.cc.

202 {
203 return HandleForEngine(
204 flutter::FlutterWindowsEngine::GetEngineForId(engine_id));
205 }
flutter::FlutterWindowsEngine::GetEngineForId
static FlutterWindowsEngine * GetEngineForId(int64_t engine_id)
Definition: flutter_windows_engine.cc:259

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

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

## ◆ FlutterDesktopEngineGetGraphicsAdapter()

IDXGIAdapter* FlutterDesktopEngineGetGraphicsAdapter | ( | FlutterDesktopEngineRef | engine | ) |

Definition at line 262 of file flutter_windows.cc.

263 {
264 auto egl_manager = EngineFromHandle(engine)->egl_manager();
265 if (egl_manager) {
266 Microsoft::WRL::ComPtr<ID3D11Device> d3d_device;
267 Microsoft::WRL::ComPtr<IDXGIDevice> dxgi_device;
268 if (egl_manager->GetDevice(d3d_device.GetAddressOf()) &&
269 SUCCEEDED(d3d_device.As(&dxgi_device))) {
270 IDXGIAdapter* adapter;
271 if (SUCCEEDED(dxgi_device->GetAdapter(&adapter))) {
272 return adapter;
273 }
274 }
275 }
276 return nullptr;
277 }
flutter::FlutterWindowsEngine::egl_manager
egl::Manager * egl_manager() const
Definition: flutter_windows_engine.h:183

References flutter::FlutterWindowsEngine::egl_manager(), and EngineFromHandle().

Referenced by FlutterDesktopViewGetGraphicsAdapter(), flutter::FlutterEngine::GetGraphicsAdapter(), and flutter::testing::TEST_F().

## ◆ FlutterDesktopEngineGetMessenger()

FlutterDesktopMessengerRef FlutterDesktopEngineGetMessenger | ( | FlutterDesktopEngineRef | engine | ) |

Definition at line 235 of file flutter_windows.cc.

236 {
237 return EngineFromHandle(engine)->messenger();
238 }
flutter::FlutterWindowsEngine::messenger
FlutterDesktopMessengerRef messenger()
Definition: flutter_windows_engine.h:160

References EngineFromHandle(), and flutter::FlutterWindowsEngine::messenger().

Referenced by flutter::FlutterEngine::FlutterEngine().

## ◆ FlutterDesktopEngineGetPluginRegistrar()

FlutterDesktopPluginRegistrarRef FlutterDesktopEngineGetPluginRegistrar | ( | FlutterDesktopEngineRef | engine,
|  | const char * | plugin_name
| ) |  |

Definition at line 225 of file flutter_windows.cc.

227 {
228 // Currently, one registrar acts as the registrar for all plugins, so the
229 // name is ignored. It is part of the API to reduce churn in the future when
230 // aligning more closely with the Flutter registrar system.
231
232 return EngineFromHandle(engine)->GetRegistrar();
233 }
flutter::FlutterWindowsEngine::GetRegistrar
FlutterDesktopPluginRegistrarRef GetRegistrar()
Definition: flutter_windows_engine.cc:704

References EngineFromHandle(), and flutter::FlutterWindowsEngine::GetRegistrar().

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

## ◆ FlutterDesktopEngineGetTextureRegistrar()

FlutterDesktopTextureRegistrarRef FlutterDesktopEngineGetTextureRegistrar | ( | FlutterDesktopEngineRef | engine | ) |

Definition at line 240 of file flutter_windows.cc.

241 {
242 return HandleForTextureRegistrar(
243 EngineFromHandle(engine)->texture_registrar());
244 }
HandleForTextureRegistrar
static FlutterDesktopTextureRegistrarRef HandleForTextureRegistrar(flutter::FlutterWindowsTextureRegistrar *registrar)
Definition: flutter_windows.cc:70

References EngineFromHandle(), and HandleForTextureRegistrar().

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

## ◆ FlutterDesktopEngineProcessExternalWindowMessage()

bool FlutterDesktopEngineProcessExternalWindowMessage | ( | FlutterDesktopEngineRef | engine,
|  | HWND | hwnd,
|  | UINT | message,
|  | WPARAM | wparam,
|  | LPARAM | lparam,
|  | LRESULT * | result
| ) |  |

Definition at line 279 of file flutter_windows.cc.

285 {
286 std::optional<LRESULT> lresult =
287 EngineFromHandle(engine)->ProcessExternalWindowMessage(hwnd, message,
288 wparam, lparam);
289 if (result && lresult.has_value()) {
290 *result = lresult.value();
291 }
292 return lresult.has_value();
293 }
flutter::FlutterWindowsEngine::ProcessExternalWindowMessage
std::optional< LRESULT > ProcessExternalWindowMessage(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)
Definition: flutter_windows_engine.cc:1074
message
Win32Message message
Definition: keyboard_unittests.cc:137

References EngineFromHandle(), message, and flutter::FlutterWindowsEngine::ProcessExternalWindowMessage().

Referenced by flutter::FlutterEngine::ProcessExternalWindowMessage().

## ◆ FlutterDesktopEngineProcessMessages()

uint64_t FlutterDesktopEngineProcessMessages | ( | FlutterDesktopEngineRef | engine | ) |

Definition at line 217 of file flutter_windows.cc.

217 {
218 return std::chrono::nanoseconds::max().count();
219 }

Referenced by flutter::FlutterEngine::ProcessMessages().

## ◆ FlutterDesktopEngineRegisterPlatformViewType()

void FlutterDesktopEngineRegisterPlatformViewType | ( | FlutterDesktopEngineRef | engine,
|  | const char * | view_type_name,
|  | FlutterPlatformViewTypeEntry | view_type
| ) |  |

Definition at line 295 of file flutter_windows.cc.

298 {
299 // TODO(schectman): forward to platform view manager.
300 // https://github.com/flutter/flutter/issues/143375
301 }

## ◆ FlutterDesktopEngineReloadSystemFonts()

void FlutterDesktopEngineReloadSystemFonts | ( | FlutterDesktopEngineRef | engine | ) |

Definition at line 221 of file flutter_windows.cc.

221 {
222 EngineFromHandle(engine)->ReloadSystemFonts();
223 }
flutter::FlutterWindowsEngine::ReloadSystemFonts
void ReloadSystemFonts()
Definition: flutter_windows_engine.cc:806

References EngineFromHandle(), and flutter::FlutterWindowsEngine::ReloadSystemFonts().

Referenced by flutter::FlutterEngine::ReloadSystemFonts().

## ◆ FlutterDesktopEngineRun()

bool FlutterDesktopEngineRun | ( | FlutterDesktopEngineRef | engine,
|  | const char * | entry_point
| ) |  |

Definition at line 207 of file flutter_windows.cc.

208 {
209 std::string_view entry_point_view{""};
210 if (entry_point != nullptr) {
211 entry_point_view = entry_point;
212 }
213
214 return EngineFromHandle(engine)->Run(entry_point_view);
215 }
flutter::FlutterWindowsEngine::Run
bool Run()
Definition: flutter_windows_engine.cc:268

References EngineFromHandle(), and flutter::FlutterWindowsEngine::Run().

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

## ◆ FlutterDesktopEngineSetNextFrameCallback()

void FlutterDesktopEngineSetNextFrameCallback | ( | FlutterDesktopEngineRef | engine,
|  | VoidCallback | callback,
|  | void * | user_data
| ) |  |

Definition at line 246 of file flutter_windows.cc.

248 {
249 EngineFromHandle(engine)->SetNextFrameCallback(
250 [callback, user_data]() { callback(user_data); });
251 }
flutter::FlutterWindowsEngine::SetNextFrameCallback
void SetNextFrameCallback(fml::closure callback)
Definition: flutter_windows_engine.cc:814
user_data
void * user_data
Definition: flutter_windows_view_unittests.cc:53
callback
FlutterDesktopBinaryReply callback
Definition: flutter_windows_view_unittests.cc:52

References callback, EngineFromHandle(), flutter::FlutterWindowsEngine::SetNextFrameCallback(), and user_data.

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

## ◆ FlutterDesktopGetDpiForHWND()

UINT FlutterDesktopGetDpiForHWND | ( | HWND | hwnd | ) |

Definition at line 329 of file flutter_windows.cc.

329 {
330 return flutter::GetDpiForHWND(hwnd);
331 }
flutter::GetDpiForHWND
UINT GetDpiForHWND(HWND hwnd)
Definition: dpi_utils.cc:128

References flutter::GetDpiForHWND().

Referenced by flutter::HostWindow::GetWindowContentSize().

## ◆ FlutterDesktopGetDpiForMonitor()

UINT FlutterDesktopGetDpiForMonitor | ( | HMONITOR | monitor | ) |

Definition at line 333 of file flutter_windows.cc.

333 {
334 return flutter::GetDpiForMonitor(monitor);
335 }
flutter::GetDpiForMonitor
UINT GetDpiForMonitor(HMONITOR monitor)
Definition: dpi_utils.cc:132

References flutter::GetDpiForMonitor().

## ◆ FlutterDesktopMessengerAddRef()

FlutterDesktopMessengerRef FlutterDesktopMessengerAddRef | ( | FlutterDesktopMessengerRef | messenger | ) |

Definition at line 409 of file flutter_windows.cc.

410 {
411 return flutter::FlutterDesktopMessenger::FromRef(messenger)
412 ->AddRef()
413 ->ToRef();
414 }
flutter::FlutterDesktopMessenger::ToRef
FlutterDesktopMessengerRef ToRef()
Convert to FlutterDesktopMessengerRef.
Definition: flutter_desktop_messenger.h:28
flutter::FlutterDesktopMessenger::FromRef
static FlutterDesktopMessenger * FromRef(FlutterDesktopMessengerRef ref)
Convert from FlutterDesktopMessengerRef.
Definition: flutter_desktop_messenger.h:33
flutter::FlutterDesktopMessenger::AddRef
FlutterDesktopMessenger * AddRef()
Definition: flutter_desktop_messenger.h:50

References flutter::FlutterDesktopMessenger::AddRef(), flutter::FlutterDesktopMessenger::FromRef(), and flutter::FlutterDesktopMessenger::ToRef().

## ◆ FlutterDesktopMessengerIsAvailable()

bool FlutterDesktopMessengerIsAvailable | ( | FlutterDesktopMessengerRef | messenger | ) |

Definition at line 420 of file flutter_windows.cc.

420 {
421 return flutter::FlutterDesktopMessenger::FromRef(messenger)->GetEngine() !=
422 nullptr;
423 }
flutter::FlutterDesktopMessenger::GetEngine
flutter::FlutterWindowsEngine * GetEngine() const
Getter for the engine field.
Definition: flutter_desktop_messenger.h:38

References flutter::FlutterDesktopMessenger::FromRef(), and flutter::FlutterDesktopMessenger::GetEngine().

Referenced by FlutterDesktopMessengerSendResponse(), FlutterDesktopMessengerSendWithReply(), and FlutterDesktopMessengerSetCallback().

## ◆ FlutterDesktopMessengerLock()

FlutterDesktopMessengerRef FlutterDesktopMessengerLock | ( | FlutterDesktopMessengerRef | messenger | ) |

Definition at line 425 of file flutter_windows.cc.

426 {
427 flutter::FlutterDesktopMessenger::FromRef(messenger)->GetMutex().lock();
428 return messenger;
429 }
flutter::FlutterDesktopMessenger::GetMutex
std::mutex & GetMutex()
Definition: flutter_desktop_messenger.h:70

References flutter::FlutterDesktopMessenger::FromRef(), and flutter::FlutterDesktopMessenger::GetMutex().

## ◆ FlutterDesktopMessengerRelease()

void FlutterDesktopMessengerRelease | ( | FlutterDesktopMessengerRef | messenger | ) |

Definition at line 416 of file flutter_windows.cc.

416 {
417 flutter::FlutterDesktopMessenger::FromRef(messenger)->Release();
418 }
flutter::FlutterDesktopMessenger::Release
void Release()
Definition: flutter_desktop_messenger.h:59

References flutter::FlutterDesktopMessenger::FromRef(), and flutter::FlutterDesktopMessenger::Release().

## ◆ FlutterDesktopMessengerSend()

bool FlutterDesktopMessengerSend | ( | FlutterDesktopMessengerRef | messenger,
|  | const char * | channel,
|  | const uint8_t * | message,
|  | const size_t | message_size
| ) |  |

Definition at line 375 of file flutter_windows.cc.

378 {
379 return FlutterDesktopMessengerSendWithReply(messenger, channel, message,
380 message_size, nullptr, nullptr);
381 }
FlutterDesktopMessengerSendWithReply
bool FlutterDesktopMessengerSendWithReply(FlutterDesktopMessengerRef messenger, const char *channel, const uint8_t *message, const size_t message_size, const FlutterDesktopBinaryReply reply, void *user_data)
Definition: flutter_windows.cc:361

References FlutterDesktopMessengerSendWithReply(), and message.

Referenced by flutter::BinaryMessengerImpl::Send().

## ◆ FlutterDesktopMessengerSendResponse()

void FlutterDesktopMessengerSendResponse | ( | FlutterDesktopMessengerRef | messenger,
|  | const FlutterDesktopMessageResponseHandle * | handle,
|  | const uint8_t * | data,
|  | size_t | data_length
| ) |  |

Definition at line 383 of file flutter_windows.cc.

387 {
388 FML_DCHECK(FlutterDesktopMessengerIsAvailable(messenger))
389 << "Messenger must reference a running engine to send a response";
390
391 flutter::FlutterDesktopMessenger::FromRef(messenger)
392 ->GetEngine()
393 ->SendPlatformMessageResponse(handle, data, data_length);
394 }
flutter::FlutterWindowsEngine::SendPlatformMessageResponse
void SendPlatformMessageResponse(const FlutterDesktopMessageResponseHandle *handle, const uint8_t *data, size_t data_length)
Definition: flutter_windows_engine.cc:785
FlutterDesktopMessengerIsAvailable
bool FlutterDesktopMessengerIsAvailable(FlutterDesktopMessengerRef messenger)
Definition: flutter_windows.cc:420

References FlutterDesktopMessengerIsAvailable(), flutter::FlutterDesktopMessenger::FromRef(), flutter::FlutterDesktopMessenger::GetEngine(), and flutter::FlutterWindowsEngine::SendPlatformMessageResponse().

Referenced by flutter::IncomingMessageDispatcher::HandleMessage().

## ◆ FlutterDesktopMessengerSendWithReply()

bool FlutterDesktopMessengerSendWithReply | ( | FlutterDesktopMessengerRef | messenger,
|  | const char * | channel,
|  | const uint8_t * | message,
|  | const size_t | message_size,
|  | const FlutterDesktopBinaryReply | reply,
|  | void * | user_data
| ) |  |

Definition at line 361 of file flutter_windows.cc.

366 {
367 FML_DCHECK(FlutterDesktopMessengerIsAvailable(messenger))
368 << "Messenger must reference a running engine to send a message";
369
370 return flutter::FlutterDesktopMessenger::FromRef(messenger)
371 ->GetEngine()
372 ->SendPlatformMessage(channel, message, message_size, reply, user_data);
373 }
flutter::FlutterWindowsEngine::SendPlatformMessage
bool SendPlatformMessage(const char *channel, const uint8_t *message, const size_t message_size, const FlutterDesktopBinaryReply reply, void *user_data)
Definition: flutter_windows_engine.cc:751

References FlutterDesktopMessengerIsAvailable(), flutter::FlutterDesktopMessenger::FromRef(), flutter::FlutterDesktopMessenger::GetEngine(), message, flutter::FlutterWindowsEngine::SendPlatformMessage(), and user_data.

Referenced by FlutterDesktopMessengerSend(), and flutter::BinaryMessengerImpl::Send().

## ◆ FlutterDesktopMessengerSetCallback()

void FlutterDesktopMessengerSetCallback | ( | FlutterDesktopMessengerRef | messenger,
|  | const char * | channel,
|  | FlutterDesktopMessageCallback | callback,
|  | void * | user_data
| ) |  |

Definition at line 396 of file flutter_windows.cc.

399 {
400 FML_DCHECK(FlutterDesktopMessengerIsAvailable(messenger))
401 << "Messenger must reference a running engine to set a callback";
402
403 flutter::FlutterDesktopMessenger::FromRef(messenger)
404 ->GetEngine()
405 ->message_dispatcher()
406 ->SetMessageCallback(channel, callback, user_data);
407 }
flutter::FlutterWindowsEngine::message_dispatcher
IncomingMessageDispatcher * message_dispatcher()
Definition: flutter_windows_engine.h:162
flutter::IncomingMessageDispatcher::SetMessageCallback
void SetMessageCallback(const std::string &channel, FlutterDesktopMessageCallback callback, void *user_data)
Definition: incoming_message_dispatcher.cc:43

References callback, FlutterDesktopMessengerIsAvailable(), flutter::FlutterDesktopMessenger::FromRef(), flutter::FlutterDesktopMessenger::GetEngine(), flutter::FlutterWindowsEngine::message_dispatcher(), flutter::IncomingMessageDispatcher::SetMessageCallback(), and user_data.

Referenced by flutter::BinaryMessengerImpl::SetMessageHandler().

## ◆ FlutterDesktopMessengerUnlock()

void FlutterDesktopMessengerUnlock | ( | FlutterDesktopMessengerRef | messenger | ) |

Definition at line 431 of file flutter_windows.cc.

431 {
432 flutter::FlutterDesktopMessenger::FromRef(messenger)->GetMutex().unlock();
433 }

References flutter::FlutterDesktopMessenger::FromRef(), and flutter::FlutterDesktopMessenger::GetMutex().

## ◆ FlutterDesktopPluginRegistrarGetMessenger()

FlutterDesktopMessengerRef FlutterDesktopPluginRegistrarGetMessenger | ( | FlutterDesktopPluginRegistrarRef | registrar | ) |

Definition at line 350 of file flutter_windows.cc.

351 {
352 return registrar->engine->messenger();
353 }
FlutterDesktopPluginRegistrar::engine
flutter::FlutterWindowsEngine * engine
Definition: window_state.h:25

References FlutterDesktopPluginRegistrar::engine, and flutter::FlutterWindowsEngine::messenger().

## ◆ FlutterDesktopPluginRegistrarGetView()

FlutterDesktopViewRef FlutterDesktopPluginRegistrarGetView | ( | FlutterDesktopPluginRegistrarRef | registrar | ) |

Definition at line 303 of file flutter_windows.cc.

304 {
305 return HandleForView(registrar->engine->view(flutter::kImplicitViewId));
306 }
flutter::FlutterWindowsEngine::view
FlutterWindowsView * view(FlutterViewId view_id) const
Definition: flutter_windows_engine.cc:692
HandleForView
static FlutterDesktopViewRef HandleForView(flutter::FlutterWindowsView *view)
Definition: flutter_windows.cc:59
flutter::kImplicitViewId
constexpr FlutterViewId kImplicitViewId
Definition: flutter_windows_engine.h:56

References FlutterDesktopPluginRegistrar::engine, HandleForView(), flutter::kImplicitViewId, and flutter::FlutterWindowsEngine::view().

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

## ◆ FlutterDesktopPluginRegistrarGetViewById()

FlutterDesktopViewRef FlutterDesktopPluginRegistrarGetViewById | ( | FlutterDesktopPluginRegistrarRef | registrar,
|  | FlutterDesktopViewId | view_id
| ) |  |

Definition at line 308 of file flutter_windows.cc.

310 {
311 return HandleForView(registrar->engine->view(view_id));
312 }

References FlutterDesktopPluginRegistrar::engine, HandleForView(), and flutter::FlutterWindowsEngine::view().

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

## ◆ FlutterDesktopPluginRegistrarRegisterTopLevelWindowProcDelegate()

void FlutterDesktopPluginRegistrarRegisterTopLevelWindowProcDelegate | ( | FlutterDesktopPluginRegistrarRef | registrar,
|  | FlutterDesktopWindowProcCallback | delegate,
|  | void * | user_data
| ) |  |

Definition at line 314 of file flutter_windows.cc.

317 {
318 registrar->engine->window_proc_delegate_manager()
319 ->RegisterTopLevelWindowProcDelegate(delegate, user_data);
320 }
flutter::FlutterWindowsEngine::window_proc_delegate_manager
WindowProcDelegateManager * window_proc_delegate_manager()
Definition: flutter_windows_engine.h:185
flutter::WindowProcDelegateManager::RegisterTopLevelWindowProcDelegate
void RegisterTopLevelWindowProcDelegate(FlutterDesktopWindowProcCallback callback, void *user_data)
Definition: window_proc_delegate_manager.cc:16

References FlutterDesktopPluginRegistrar::engine, flutter::WindowProcDelegateManager::RegisterTopLevelWindowProcDelegate(), user_data, and flutter::FlutterWindowsEngine::window_proc_delegate_manager().

Referenced by flutter::PluginRegistrarWindows::RegisterTopLevelWindowProcDelegate().

## ◆ FlutterDesktopPluginRegistrarSetDestructionHandler()

void FlutterDesktopPluginRegistrarSetDestructionHandler | ( | FlutterDesktopPluginRegistrarRef | registrar,
|  | FlutterDesktopOnPluginRegistrarDestroyed | callback
| ) |  |

Definition at line 355 of file flutter_windows.cc.

357 {
358 registrar->engine->AddPluginRegistrarDestructionCallback(callback, registrar);
359 }
flutter::FlutterWindowsEngine::AddPluginRegistrarDestructionCallback
void AddPluginRegistrarDestructionCallback(FlutterDesktopOnPluginRegistrarDestroyed callback, FlutterDesktopPluginRegistrarRef registrar)
Definition: flutter_windows_engine.cc:708

References flutter::FlutterWindowsEngine::AddPluginRegistrarDestructionCallback(), callback, and FlutterDesktopPluginRegistrar::engine.

Referenced by flutter::PluginRegistrarManager::GetRegistrar().

## ◆ FlutterDesktopPluginRegistrarUnregisterTopLevelWindowProcDelegate()

void FlutterDesktopPluginRegistrarUnregisterTopLevelWindowProcDelegate | ( | FlutterDesktopPluginRegistrarRef | registrar,
|  | FlutterDesktopWindowProcCallback | delegate
| ) |  |

Definition at line 322 of file flutter_windows.cc.

324 {
325 registrar->engine->window_proc_delegate_manager()
326 ->UnregisterTopLevelWindowProcDelegate(delegate);
327 }
flutter::WindowProcDelegateManager::UnregisterTopLevelWindowProcDelegate
void UnregisterTopLevelWindowProcDelegate(FlutterDesktopWindowProcCallback callback)
Definition: window_proc_delegate_manager.cc:27

References FlutterDesktopPluginRegistrar::engine, flutter::WindowProcDelegateManager::UnregisterTopLevelWindowProcDelegate(), and flutter::FlutterWindowsEngine::window_proc_delegate_manager().

Referenced by flutter::PluginRegistrarWindows::UnregisterTopLevelWindowProcDelegate().

## ◆ FlutterDesktopRegistrarGetTextureRegistrar()

FlutterDesktopTextureRegistrarRef FlutterDesktopRegistrarGetTextureRegistrar | ( | FlutterDesktopPluginRegistrarRef | registrar | ) |

Definition at line 435 of file flutter_windows.cc.

436 {
437 return HandleForTextureRegistrar(registrar->engine->texture_registrar());
438 }
flutter::FlutterWindowsEngine::texture_registrar
FlutterWindowsTextureRegistrar * texture_registrar()
Definition: flutter_windows_engine.h:177

References FlutterDesktopPluginRegistrar::engine, HandleForTextureRegistrar(), and flutter::FlutterWindowsEngine::texture_registrar().

## ◆ FlutterDesktopResyncOutputStreams()

void FlutterDesktopResyncOutputStreams | ( |  | ) |

Definition at line 337 of file flutter_windows.cc.

337 {
338 FILE* unused;
339 if (freopen_s(&unused, "CONOUT$", "w", stdout)) {
340 _dup2(_fileno(stdout), 1);
341 }
342 if (freopen_s(&unused, "CONOUT$", "w", stderr)) {
343 _dup2(_fileno(stdout), 2);
344 }
345 std::ios::sync_with_stdio();
346 }

## ◆ FlutterDesktopTextureRegistrarMarkExternalTextureFrameAvailable()

bool FlutterDesktopTextureRegistrarMarkExternalTextureFrameAvailable | ( | FlutterDesktopTextureRegistrarRef | texture_registrar,
|  | int64_t | texture_id
| ) |  |

Definition at line 461 of file flutter_windows.cc.

463 {
464 return TextureRegistrarFromHandle(texture_registrar)
465 ->MarkTextureFrameAvailable(texture_id);
466 }
flutter::FlutterWindowsTextureRegistrar::MarkTextureFrameAvailable
bool MarkTextureFrameAvailable(int64_t texture_id)
Definition: flutter_windows_texture_registrar.cc:103
texture_id
uint32_t texture_id
Definition: compositor_opengl.cc:20
TextureRegistrarFromHandle
static flutter::FlutterWindowsTextureRegistrar * TextureRegistrarFromHandle(FlutterDesktopTextureRegistrarRef ref)
Definition: flutter_windows.cc:64

References flutter::FlutterWindowsTextureRegistrar::MarkTextureFrameAvailable(), texture_id, and TextureRegistrarFromHandle().

Referenced by flutter::TextureRegistrarImpl::MarkTextureFrameAvailable().

## ◆ FlutterDesktopTextureRegistrarRegisterExternalTexture()

int64_t FlutterDesktopTextureRegistrarRegisterExternalTexture | ( | FlutterDesktopTextureRegistrarRef | texture_registrar,
|  | const FlutterDesktopTextureInfo * | texture_info
| ) |  |

Definition at line 440 of file flutter_windows.cc.

442 {
443 return TextureRegistrarFromHandle(texture_registrar)
444 ->RegisterTexture(texture_info);
445 }
flutter::FlutterWindowsTextureRegistrar::RegisterTexture
int64_t RegisterTexture(const FlutterDesktopTextureInfo *texture_info)
Definition: flutter_windows_texture_registrar.cc:26

References flutter::FlutterWindowsTextureRegistrar::RegisterTexture(), and TextureRegistrarFromHandle().

Referenced by flutter::TextureRegistrarImpl::RegisterTexture().

## ◆ FlutterDesktopTextureRegistrarUnregisterExternalTexture()

void FlutterDesktopTextureRegistrarUnregisterExternalTexture | ( | FlutterDesktopTextureRegistrarRef | texture_registrar,
|  | int64_t | texture_id,
|  | void(*)(void *user_data) | callback,
|  | void * | user_data
| ) |  |

Definition at line 447 of file flutter_windows.cc.

451 {
452 auto registrar = TextureRegistrarFromHandle(texture_registrar);
453 if (callback) {
454 registrar->UnregisterTexture(
455 texture_id, [callback, user_data]() { callback(user_data); });
456 return;
457 }
458 registrar->UnregisterTexture(texture_id);
459 }

References callback, texture_id, TextureRegistrarFromHandle(), and user_data.

Referenced by flutter::TextureRegistrarImpl::UnregisterTexture().

## ◆ FlutterDesktopViewControllerCreate()

FlutterDesktopViewControllerRef FlutterDesktopViewControllerCreate | ( | int | width,
|  | int | height,
|  | FlutterDesktopEngineRef | engine
| ) |  |

Definition at line 122 of file flutter_windows.cc.

125 {
126 return CreateViewController(engine, width, height, /*owns_engine=*/true);
127 }

References CreateViewController().

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

## ◆ FlutterDesktopViewControllerDestroy()

void FlutterDesktopViewControllerDestroy | ( | FlutterDesktopViewControllerRef | ref | ) |

Definition at line 136 of file flutter_windows.cc.

136 {
137 auto controller = ViewControllerFromHandle(ref);
138 controller->Destroy();
139 delete controller;
140 }
ViewControllerFromHandle
static flutter::FlutterWindowsViewController * ViewControllerFromHandle(FlutterDesktopViewControllerRef ref)
Definition: flutter_windows.cc:43

References ViewControllerFromHandle().

Referenced by flutter::FlutterViewController::~FlutterViewController().

## ◆ FlutterDesktopViewControllerForceRedraw()

void FlutterDesktopViewControllerForceRedraw | ( | FlutterDesktopViewControllerRef | ref | ) |

Definition at line 160 of file flutter_windows.cc.

161 {
162 auto controller = ViewControllerFromHandle(ref);
163 controller->view()->ForceRedraw();
164 }

References ViewControllerFromHandle().

Referenced by flutter::FlutterViewController::ForceRedraw().

## ◆ FlutterDesktopViewControllerGetEngine()

FlutterDesktopEngineRef FlutterDesktopViewControllerGetEngine | ( | FlutterDesktopViewControllerRef | ref | ) |

Definition at line 148 of file flutter_windows.cc.

149 {
150 auto controller = ViewControllerFromHandle(ref);
151 return HandleForEngine(controller->engine());
152 }

References HandleForEngine(), and ViewControllerFromHandle().

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

## ◆ FlutterDesktopViewControllerGetView()

FlutterDesktopViewRef FlutterDesktopViewControllerGetView | ( | FlutterDesktopViewControllerRef | ref | ) |

Definition at line 154 of file flutter_windows.cc.

155 {
156 auto controller = ViewControllerFromHandle(ref);
157 return HandleForView(controller->view());
158 }

References HandleForView(), and ViewControllerFromHandle().

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

## ◆ FlutterDesktopViewControllerGetViewId()

FlutterDesktopViewId FlutterDesktopViewControllerGetViewId | ( | FlutterDesktopViewControllerRef | ref | ) |

Definition at line 142 of file flutter_windows.cc.

143 {
144 auto controller = ViewControllerFromHandle(ref);
145 return static_cast<FlutterDesktopViewId>(controller->view()->view_id());
146 }
FlutterDesktopViewId
int64_t FlutterDesktopViewId
Definition: flutter_windows.h:36

References ViewControllerFromHandle().

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

## ◆ FlutterDesktopViewControllerHandleTopLevelWindowProc()

bool FlutterDesktopViewControllerHandleTopLevelWindowProc | ( | FlutterDesktopViewControllerRef | ref,
|  | HWND | hwnd,
|  | UINT | message,
|  | WPARAM | wparam,
|  | LPARAM | lparam,
|  | LRESULT * | result
| ) |  |

Definition at line 166 of file flutter_windows.cc.

172 {
173 auto controller = ViewControllerFromHandle(ref);
174 std::optional<LRESULT> delegate_result =
175 controller->engine()
176 ->window_proc_delegate_manager()
177 ->OnTopLevelWindowProc(hwnd, message, wparam, lparam);
178 if (delegate_result) {
179 *result = *delegate_result;
180 }
181 return delegate_result.has_value();
182 }

References message, and ViewControllerFromHandle().

Referenced by flutter::FlutterViewController::HandleTopLevelWindowProc().

## ◆ FlutterDesktopViewGetGraphicsAdapter()

IDXGIAdapter* FlutterDesktopViewGetGraphicsAdapter | ( | FlutterDesktopViewRef | view | ) |

Definition at line 257 of file flutter_windows.cc.

257 {
258 auto engine = ViewFromHandle(view)->GetEngine();
259 return FlutterDesktopEngineGetGraphicsAdapter(HandleForEngine(engine));
260 }
flutter::FlutterWindowsView::GetEngine
FlutterWindowsEngine * GetEngine() const
Definition: flutter_windows_view.cc:868
ViewFromHandle
static flutter::FlutterWindowsView * ViewFromHandle(FlutterDesktopViewRef ref)
Definition: flutter_windows.cc:54
FlutterDesktopEngineGetGraphicsAdapter
IDXGIAdapter * FlutterDesktopEngineGetGraphicsAdapter(FlutterDesktopEngineRef engine)
Definition: flutter_windows.cc:262

References FlutterDesktopEngineGetGraphicsAdapter(), flutter::FlutterWindowsView::GetEngine(), HandleForEngine(), and ViewFromHandle().

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

## ◆ FlutterDesktopViewGetHWND()

HWND FlutterDesktopViewGetHWND | ( | FlutterDesktopViewRef | view | ) |

Definition at line 253 of file flutter_windows.cc.

253 {
254 return ViewFromHandle(view)->GetWindowHandle();
255 }
flutter::FlutterWindowsView::GetWindowHandle
virtual HWND GetWindowHandle() const
Definition: flutter_windows_view.cc:864

References flutter::FlutterWindowsView::GetWindowHandle(), and ViewFromHandle().

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

## ◆ HandleForEngine()

static FlutterDesktopEngineRef HandleForEngine | ( | flutter::FlutterWindowsEngine * | engine | ) |
| static

Definition at line 38 of file flutter_windows.cc.

39 {
40 return reinterpret_cast<FlutterDesktopEngineRef>(engine);
41 }
FlutterDesktopEngineRef
struct FlutterDesktopEngine * FlutterDesktopEngineRef
Definition: flutter_windows.h:33

Referenced by FlutterDesktopEngineCreate(), FlutterDesktopEngineForId(), FlutterDesktopViewControllerGetEngine(), and FlutterDesktopViewGetGraphicsAdapter().

## ◆ HandleForTextureRegistrar()

static FlutterDesktopTextureRegistrarRef HandleForTextureRegistrar | ( | flutter::FlutterWindowsTextureRegistrar * | registrar | ) |
| static

Definition at line 70 of file flutter_windows.cc.

71 {
72 return reinterpret_cast<FlutterDesktopTextureRegistrarRef>(registrar);
73 }
FlutterDesktopTextureRegistrarRef
struct FlutterDesktopTextureRegistrar * FlutterDesktopTextureRegistrarRef
Definition: flutter_texture_registrar.h:19

Referenced by FlutterDesktopEngineGetTextureRegistrar(), and FlutterDesktopRegistrarGetTextureRegistrar().

## ◆ HandleForView()

static FlutterDesktopViewRef HandleForView | ( | flutter::FlutterWindowsView * | view | ) |
| static

Definition at line 59 of file flutter_windows.cc.

59 {
60 return reinterpret_cast<FlutterDesktopViewRef>(view);
61 }
FlutterDesktopViewRef
struct FlutterDesktopView * FlutterDesktopViewRef
Definition: flutter_windows.h:29

Referenced by FlutterDesktopPluginRegistrarGetView(), FlutterDesktopPluginRegistrarGetViewById(), and FlutterDesktopViewControllerGetView().

## ◆ HandleForViewController()

static FlutterDesktopViewControllerRef HandleForViewController | ( | flutter::FlutterWindowsViewController * | view_controller | ) |
| static

Definition at line 48 of file flutter_windows.cc.

49 {
50 return reinterpret_cast<FlutterDesktopViewControllerRef>(view_controller);
51 }
FlutterDesktopViewControllerRef
struct FlutterDesktopViewController * FlutterDesktopViewControllerRef
Definition: flutter_windows.h:25

Referenced by CreateViewController().

## ◆ TextureRegistrarFromHandle()

static flutter::FlutterWindowsTextureRegistrar* TextureRegistrarFromHandle | ( | FlutterDesktopTextureRegistrarRef | ref | ) |
| static

Definition at line 64 of file flutter_windows.cc.

65 {
66 return reinterpret_cast<flutter::FlutterWindowsTextureRegistrar*>(ref);
67 }
flutter::FlutterWindowsTextureRegistrar
Definition: flutter_windows_texture_registrar.h:24

Referenced by FlutterDesktopTextureRegistrarMarkExternalTextureFrameAvailable(), FlutterDesktopTextureRegistrarRegisterExternalTexture(), and FlutterDesktopTextureRegistrarUnregisterExternalTexture().

## ◆ ViewControllerFromHandle()

static flutter::FlutterWindowsViewController* ViewControllerFromHandle | ( | FlutterDesktopViewControllerRef | ref | ) |
| static

Definition at line 43 of file flutter_windows.cc.

44 {
45 return reinterpret_cast<flutter::FlutterWindowsViewController*>(ref);
46 }
flutter::FlutterWindowsViewController
Controls a view that displays Flutter content.
Definition: flutter_windows_view_controller.h:17

Referenced by FlutterDesktopViewControllerDestroy(), FlutterDesktopViewControllerForceRedraw(), FlutterDesktopViewControllerGetEngine(), FlutterDesktopViewControllerGetView(), FlutterDesktopViewControllerGetViewId(), and FlutterDesktopViewControllerHandleTopLevelWindowProc().

## ◆ ViewFromHandle()

static flutter::FlutterWindowsView* ViewFromHandle | ( | FlutterDesktopViewRef | ref | ) |
| static

Definition at line 54 of file flutter_windows.cc.

54 {
55 return reinterpret_cast<flutter::FlutterWindowsView*>(ref);
56 }
flutter::FlutterWindowsView
Definition: flutter_windows_view.h:47

Referenced by FlutterDesktopViewGetGraphicsAdapter(), and FlutterDesktopViewGetHWND().