| Flutter Windows Embedder |

flutter_windows_engine.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_FLUTTER_WINDOWS_ENGINE_H_
6 #define FLUTTER_SHELL_PLATFORM_WINDOWS_FLUTTER_WINDOWS_ENGINE_H_
7
8 #include <chrono>
9 #include <map>
10 #include <memory>
11 #include <optional>
12 #include <string>
13 #include <string_view>
14 #include <unordered_map>
15 #include <vector>
16
17 #include "flutter/fml/closure.h"
18 #include "flutter/fml/macros.h"
19 #include "flutter/shell/platform/common/accessibility_bridge.h"
20 #include "flutter/shell/platform/common/app_lifecycle_state.h"
21 #include "flutter/shell/platform/common/client_wrapper/binary_messenger_impl.h"
22 #include "flutter/shell/platform/common/client_wrapper/include/flutter/basic_message_channel.h"
23 #include "flutter/shell/platform/common/incoming_message_dispatcher.h"
24 #include "flutter/shell/platform/embedder/embedder.h"
25 #include "flutter/shell/platform/windows/accessibility_bridge_windows.h"
26 #include "flutter/shell/platform/windows/accessibility_plugin.h"
27 #include "flutter/shell/platform/windows/compositor.h"
28 #include "flutter/shell/platform/windows/cursor_handler.h"
29 #include "flutter/shell/platform/windows/egl/manager.h"
30 #include "flutter/shell/platform/windows/egl/proc_table.h"
31 #include "flutter/shell/platform/windows/flutter_desktop_messenger.h"
32 #include "flutter/shell/platform/windows/flutter_project_bundle.h"
33 #include "flutter/shell/platform/windows/flutter_windows_texture_registrar.h"
34 #include "flutter/shell/platform/windows/keyboard_handler_base.h"
35 #include "flutter/shell/platform/windows/keyboard_key_embedder_handler.h"
36 #include "flutter/shell/platform/windows/platform_handler.h"
37 #include "flutter/shell/platform/windows/platform_view_plugin.h"
38 #include "flutter/shell/platform/windows/public/flutter_windows.h"
39 #include "flutter/shell/platform/windows/settings_plugin.h"
40 #include "flutter/shell/platform/windows/task_runner.h"
41 #include "flutter/shell/platform/windows/text_input_plugin.h"
42 #include "flutter/shell/platform/windows/window_proc_delegate_manager.h"
43 #include "flutter/shell/platform/windows/window_state.h"
44 #include "flutter/shell/platform/windows/windows_lifecycle_manager.h"
45 #include "flutter/shell/platform/windows/windows_proc_table.h"
46 #include "third_party/rapidjson/include/rapidjson/document.h"
47
48 namespace flutter {
49
50 // The implicit view's ID.
51 //
52 // See:
53 // https://api.flutter.dev/flutter/dart-ui/PlatformDispatcher/implicitView.html
54 constexpr FlutterViewId kImplicitViewId = 0;
55
56 class FlutterWindowsView;
57
58 // Update the thread priority for the Windows engine.
59 static void WindowsPlatformThreadPrioritySetter(
60 FlutterThreadPriority priority) {
61 // TODO(99502): Add support for tracing to the windows embedding so we can
62 // mark thread priorities and success/failure.
63 switch (priority) {
64 case FlutterThreadPriority::kBackground: {
65 SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_BELOW_NORMAL);
66 break;
67 }
68 case FlutterThreadPriority::kDisplay: {
69 SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_ABOVE_NORMAL);
70 break;
71 }
72 case FlutterThreadPriority::kRaster: {
73 SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_ABOVE_NORMAL);
74 break;
75 }
76 case FlutterThreadPriority::kNormal: {
77 // For normal or default priority we do not need to set the priority
78 // class.
79 break;
80 }
81 }
82 }
83
84 // Manages state associated with the underlying FlutterEngine that isn't
85 // related to its display.
86 //
87 // In most cases this will be associated with a FlutterView, but if not will
88 // run in headless mode.
89 class FlutterWindowsEngine {
90 public:
91 // Creates a new Flutter engine object configured to run |project|.
92 FlutterWindowsEngine(
93 const FlutterProjectBundle& project,
94 std::shared_ptr<WindowsProcTable> windows_proc_table = nullptr);
95
96 virtual ~FlutterWindowsEngine();
97
98 // Starts running the entrypoint function specifed in the project bundle. If
99 // unspecified, defaults to main().
100 //
101 // Returns false if the engine couldn't be started.
102 bool Run();
103
104 // Starts running the engine with the given entrypoint. If the empty string
105 // is specified, defaults to the entrypoint function specified in the project
106 // bundle, or main() if both are unspecified.
107 //
108 // Returns false if the engine couldn't be started or if conflicting,
109 // non-default values are passed here and in the project bundle..
110 //
111 // DEPRECATED: Prefer setting the entrypoint in the FlutterProjectBundle
112 // passed to the constructor and calling the no-parameter overload.
113 bool Run(std::string_view entrypoint);
114
115 // Returns true if the engine is currently running.
116 virtual bool running() const { return engine_ != nullptr; }
117
118 // Stops the engine. This invalidates the pointer returned by engine().
119 //
120 // Returns false if stopping the engine fails, or if it was not running.
121 virtual bool Stop();
122
123 // Create a view that can display this engine's content.
124 std::unique_ptr<FlutterWindowsView> CreateView(
125 std::unique_ptr<WindowBindingHandler> window);
126
127 // Get a view that displays this engine's content.
128 //
129 // Returns null if the view does not exist.
130 FlutterWindowsView* view(FlutterViewId view_id) const;
131
132 // Returns the currently configured Plugin Registrar.
133 FlutterDesktopPluginRegistrarRef GetRegistrar();
134
135 // Registers |callback| to be called when the plugin registrar is destroyed.
136 void AddPluginRegistrarDestructionCallback(
137 FlutterDesktopOnPluginRegistrarDestroyed callback,
138 FlutterDesktopPluginRegistrarRef registrar);
139
140 // Sets switches member to the given switches.
141 void SetSwitches(const std::vector<std::string>& switches);
142
143 FlutterDesktopMessengerRef messenger() { return messenger_->ToRef(); }
144
145 IncomingMessageDispatcher* message_dispatcher() {
146 return message_dispatcher_.get();
147 }
148
149 TaskRunner* task_runner() { return task_runner_.get(); }
150
151 BinaryMessenger* messenger_wrapper() { return messenger_wrapper_.get(); }
152
153 FlutterWindowsTextureRegistrar* texture_registrar() {
154 return texture_registrar_.get();
155 }
156
157 // The EGL manager object. If this is nullptr, then we are
158 // rendering using software instead of OpenGL.
159 egl::Manager* egl_manager() const { return egl_manager_.get(); }
160
161 WindowProcDelegateManager* window_proc_delegate_manager() {
162 return window_proc_delegate_manager_.get();
163 }
164
165 // Informs the engine that the window metrics have changed.
166 void SendWindowMetricsEvent(const FlutterWindowMetricsEvent& event);
167
168 // Informs the engine of an incoming pointer event.
169 void SendPointerEvent(const FlutterPointerEvent& event);
170
171 // Informs the engine of an incoming key event.
172 void SendKeyEvent(const FlutterKeyEvent& event,
173 FlutterKeyEventCallback callback,
174 void* user_data);
175
176 KeyboardHandlerBase* keyboard_key_handler() {
177 return keyboard_key_handler_.get();
178 }
179 TextInputPlugin* text_input_plugin() { return text_input_plugin_.get(); }
180
181 // Sends the given message to the engine, calling |reply| with |user_data|
182 // when a response is received from the engine if they are non-null.
183 bool SendPlatformMessage(const char* channel,
184 const uint8_t* message,
185 const size_t message_size,
186 const FlutterDesktopBinaryReply reply,
187 void* user_data);
188
189 // Sends the given data as the response to an earlier platform message.
190 void SendPlatformMessageResponse(
191 const FlutterDesktopMessageResponseHandle* handle,
192 const uint8_t* data,
193 size_t data_length);
194
195 // Callback passed to Flutter engine for notifying window of platform
196 // messages.
197 void HandlePlatformMessage(const FlutterPlatformMessage*);
198
199 // Informs the engine that the system font list has changed.
200 void ReloadSystemFonts();
201
202 // Informs the engine that a new frame is needed to redraw the content.
203 void ScheduleFrame();
204
205 // Set the callback that is called when the next frame is drawn.
206 void SetNextFrameCallback(fml::closure callback);
207
208 // Attempts to register the texture with the given |texture_id|.
209 bool RegisterExternalTexture(int64_t texture_id);
210
211 // Attempts to unregister the texture with the given |texture_id|.
212 bool UnregisterExternalTexture(int64_t texture_id);
213
214 // Notifies the engine about a new frame being available for the
215 // given |texture_id|.
216 bool MarkExternalTextureFrameAvailable(int64_t texture_id);
217
218 // Posts the given callback onto the raster thread.
219 virtual bool PostRasterThreadTask(fml::closure callback) const;
220
221 // Invoke on the embedder's vsync callback to schedule a frame.
222 void OnVsync(intptr_t baton);
223
224 // Dispatches a semantics action to the specified semantics node.
225 bool DispatchSemanticsAction(uint64_t id,
226 FlutterSemanticsAction action,
227 fml::MallocMapping data);
228
229 // Informs the engine that the semantics enabled state has changed.
230 void UpdateSemanticsEnabled(bool enabled);
231
232 // Returns true if the semantics tree is enabled.
233 bool semantics_enabled() const { return semantics_enabled_; }
234
235 // Refresh accessibility features and send them to the engine.
236 void UpdateAccessibilityFeatures();
237
238 // Refresh high contrast accessibility mode and notify the engine.
239 void UpdateHighContrastMode();
240
241 // Returns true if the high contrast feature is enabled.
242 bool high_contrast_enabled() const { return high_contrast_enabled_; }
243
244 // Register a root isolate create callback.
245 //
246 // The root isolate create callback is invoked at creation of the root Dart
247 // isolate in the app. This may be used to be notified that execution of the
248 // main Dart entrypoint is about to begin, and is used by test infrastructure
249 // to register a native function resolver that can register and resolve
250 // functions marked as native in the Dart code.
251 //
252 // This must be called before calling |Run|.
253 void SetRootIsolateCreateCallback(const fml::closure& callback) {
254 root_isolate_create_callback_ = callback;
255 }
256
257 // Returns the executable name for this process or "Flutter" if unknown.
258 std::string GetExecutableName() const;
259
260 // Called when the application quits in response to a quit request.
261 void OnQuit(std::optional<HWND> hwnd,
262 std::optional<WPARAM> wparam,
263 std::optional<LPARAM> lparam,
264 UINT exit_code);
265
266 // Called when a WM_CLOSE message is received.
267 void RequestApplicationQuit(HWND hwnd,
268 WPARAM wparam,
269 LPARAM lparam,
270 AppExitType exit_type);
271
272 // Called when a WM_DWMCOMPOSITIONCHANGED message is received.
273 void OnDwmCompositionChanged();
274
275 // Called when a Window receives an event that may alter the application
276 // lifecycle state.
277 void OnWindowStateEvent(HWND hwnd, WindowStateEvent event);
278
279 // Handle a message from a non-Flutter window in the same application.
280 // Returns a result when the message is consumed and should not be processed
281 // further.
282 std::optional<LRESULT> ProcessExternalWindowMessage(HWND hwnd,
283 UINT message,
284 WPARAM wparam,
285 LPARAM lparam);
286
287 WindowsLifecycleManager* lifecycle_manager() {
288 return lifecycle_manager_.get();
289 }
290
291 std::shared_ptr<WindowsProcTable> windows_proc_table() {
292 return windows_proc_table_;
293 }
294
295 protected:
296 // Creates the keyboard key handler.
297 //
298 // Exposing this method allows unit tests to override in order to
299 // capture information.
300 virtual std::unique_ptr<KeyboardHandlerBase> CreateKeyboardKeyHandler(
301 BinaryMessenger* messenger,
302 KeyboardKeyEmbedderHandler::GetKeyStateHandler get_key_state,
303 KeyboardKeyEmbedderHandler::MapVirtualKeyToScanCode map_vk_to_scan);
304
305 // Creates the text input plugin.
306 //
307 // Exposing this method allows unit tests to override in order to
308 // capture information.
309 virtual std::unique_ptr<TextInputPlugin> CreateTextInputPlugin(
310 BinaryMessenger* messenger);
311
312 // Invoked by the engine right before the engine is restarted.
313 //
314 // This should reset necessary states to as if the engine has just been
315 // created. This is typically caused by a hot restart (Shift-R in CLI.)
316 void OnPreEngineRestart();
317
318 // Invoked by the engine when a listener is set or cleared on a platform
319 // channel.
320 virtual void OnChannelUpdate(std::string name, bool listening);
321
322 private:
323 // Allows swapping out embedder_api_ calls in tests.
324 friend class EngineModifier;
325
326 // Sends system locales to the engine.
327 //
328 // Should be called just after the engine is run, and after any relevant
329 // system changes.
330 void SendSystemLocales();
331
332 // Sends the current lifecycle state to the framework.
333 void SetLifecycleState(flutter::AppLifecycleState state);
334
335 // Create the keyboard & text input sub-systems.
336 //
337 // This requires that a view is attached to the engine.
338 // Calling this method again resets the keyboard state.
339 void InitializeKeyboard();
340
341 // Send the currently enabled accessibility features to the engine.
342 void SendAccessibilityFeatures();
343
344 // The handle to the embedder.h engine instance.
345 FLUTTER_API_SYMBOL(FlutterEngine) engine_ = nullptr;
346
347 FlutterEngineProcTable embedder_api_ = {};
348
349 std::unique_ptr<FlutterProjectBundle> project_;
350
351 // AOT data, if any.
352 UniqueAotDataPtr aot_data_;
353
354 // The views displaying the content running in this engine, if any.
355 std::unordered_map<FlutterViewId, FlutterWindowsView*> views_;
356
357 // Task runner for tasks posted from the engine.
358 std::unique_ptr<TaskRunner> task_runner_;
359
360 // The plugin messenger handle given to API clients.
361 fml::RefPtr<flutter::FlutterDesktopMessenger> messenger_;
362
363 // A wrapper around messenger_ for interacting with client_wrapper-level APIs.
364 std::unique_ptr<BinaryMessengerImpl> messenger_wrapper_;
365
366 // Message dispatch manager for messages from engine_.
367 std::unique_ptr<IncomingMessageDispatcher> message_dispatcher_;
368
369 // The plugin registrar handle given to API clients.
370 std::unique_ptr<FlutterDesktopPluginRegistrar> plugin_registrar_;
371
372 // The texture registrar.
373 std::unique_ptr<FlutterWindowsTextureRegistrar> texture_registrar_;
374
375 // An object used for intializing ANGLE and creating / destroying render
376 // surfaces. If nullptr, ANGLE failed to initialize and software rendering
377 // should be used instead.
378 std::unique_ptr<egl::Manager> egl_manager_;
379
380 // The compositor that creates backing stores for the engine to render into
381 // and then presents them onto views.
382 std::unique_ptr<Compositor> compositor_;
383
384 // The plugin registrar managing internal plugins.
385 std::unique_ptr<PluginRegistrar> internal_plugin_registrar_;
386
387 // Handler for accessibility events.
388 std::unique_ptr<AccessibilityPlugin> accessibility_plugin_;
389
390 // Handler for cursor events.
391 std::unique_ptr<CursorHandler> cursor_handler_;
392
393 // Handler for the flutter/platform channel.
394 std::unique_ptr<PlatformHandler> platform_handler_;
395
396 // Handlers for keyboard events from Windows.
397 std::unique_ptr<KeyboardHandlerBase> keyboard_key_handler_;
398
399 // Handlers for text events from Windows.
400 std::unique_ptr<TextInputPlugin> text_input_plugin_;
401
402 // The settings plugin.
403 std::unique_ptr<SettingsPlugin> settings_plugin_;
404
405 // Callbacks to be called when the engine (and thus the plugin registrar) is
406 // being destroyed.
407 std::map<FlutterDesktopOnPluginRegistrarDestroyed,
408 FlutterDesktopPluginRegistrarRef>
409 plugin_registrar_destruction_callbacks_;
410
411 // The approximate time between vblank events.
412 std::chrono::nanoseconds FrameInterval();
413
414 // The start time used to align frames.
415 std::chrono::nanoseconds start_time_ = std::chrono::nanoseconds::zero();
416
417 // An override of the frame interval used by EngineModifier for testing.
418 std::optional<std::chrono::nanoseconds> frame_interval_override_ =
419 std::nullopt;
420
421 bool semantics_enabled_ = false;
422
423 bool high_contrast_enabled_ = false;
424
425 bool enable_impeller_ = false;
426
427 // The manager for WindowProc delegate registration and callbacks.
428 std::unique_ptr<WindowProcDelegateManager> window_proc_delegate_manager_;
429
430 // The root isolate creation callback.
431 fml::closure root_isolate_create_callback_;
432
433 // The on frame drawn callback.
434 fml::closure next_frame_callback_;
435
436 // Handler for top level window messages.
437 std::unique_ptr<WindowsLifecycleManager> lifecycle_manager_;
438
439 std::shared_ptr<WindowsProcTable> windows_proc_table_;
440
441 std::shared_ptr<egl::ProcTable> gl_;
442
443 std::unique_ptr<PlatformViewPlugin> platform_view_plugin_;
444
445 FML_DISALLOW_COPY_AND_ASSIGN(FlutterWindowsEngine);
446 };
447
448 } // namespace flutter
449
450 #endif // FLUTTER_SHELL_PLATFORM_WINDOWS_FLUTTER_WINDOWS_ENGINE_H_
flutter::kImplicitViewId
constexpr FlutterViewId kImplicitViewId
Definition: flutter_windows_engine.h:54
flutter::FlutterWindowsEngine::RequestApplicationQuit
void RequestApplicationQuit(HWND hwnd, WPARAM wparam, LPARAM lparam, AppExitType exit_type)
Definition: flutter_windows_engine.cc:818
flutter::WindowStateEvent
WindowStateEvent
An event representing a change in window state that may update the.
Definition: windows_lifecycle_manager.h:24
flutter::FlutterWindowsEngine::GetRegistrar
FlutterDesktopPluginRegistrarRef GetRegistrar()
Definition: flutter_windows_engine.cc:543
flutter::FlutterWindowsEngine::PostRasterThreadTask
virtual bool PostRasterThreadTask(fml::closure callback) const
Definition: flutter_windows_engine.cc:735
flutter::FlutterWindowsEngine::high_contrast_enabled
bool high_contrast_enabled() const
Definition: flutter_windows_engine.h:242
flutter::FlutterProjectBundle
Definition: flutter_project_bundle.h:21
flutter::FlutterWindowsEngine::OnChannelUpdate
virtual void OnChannelUpdate(std::string name, bool listening)
Definition: flutter_windows_engine.cc:855
flutter::FlutterWindowsEngine::CreateTextInputPlugin
virtual std::unique_ptr< TextInputPlugin > CreateTextInputPlugin(BinaryMessenger *messenger)
Definition: flutter_windows_engine.cc:714
flutter::FlutterWindowsEngine::UnregisterExternalTexture
bool UnregisterExternalTexture(int64_t texture_id)
Definition: flutter_windows_engine.cc:724
flutter_windows_texture_registrar.h
flutter::AppExitType
AppExitType
Definition: platform_handler.h:27
flutter::FlutterWindowsEngine::view
FlutterWindowsView * view(FlutterViewId view_id) const
Definition: flutter_windows_engine.cc:533
flutter::FlutterWindowsEngine::SendPointerEvent
void SendPointerEvent(const FlutterPointerEvent &event)
Definition: flutter_windows_engine.cc:560
flutter::UniqueAotDataPtr
std::unique_ptr< _FlutterEngineAOTData, FlutterEngineCollectAOTDataFnPtr > UniqueAotDataPtr
Definition: flutter_project_bundle.h:18
flutter::FlutterWindowsView
Definition: flutter_windows_view.h:34
settings_plugin.h
window_proc_delegate_manager.h
flutter::IncomingMessageDispatcher
Definition: incoming_message_dispatcher.h:20
windows_lifecycle_manager.h
flutter::FlutterEngine
Definition: flutter_engine.h:28
text_input_plugin.h
FlutterDesktopBinaryReply
void(* FlutterDesktopBinaryReply)(const uint8_t *data, size_t data_size, void *user_data)
Definition: flutter_messenger.h:26
flutter::FlutterWindowsEngine::OnVsync
void OnVsync(intptr_t baton)
Definition: flutter_windows_engine.cc:505
flutter::FlutterWindowsEngine::task_runner
TaskRunner * task_runner()
Definition: flutter_windows_engine.h:149
flutter::FlutterWindowsEngine::SetNextFrameCallback
void SetNextFrameCallback(fml::closure callback)
Definition: flutter_windows_engine.cc:637
user_data
void * user_data
Definition: flutter_windows_view_unittests.cc:52
flutter::FlutterWindowsEngine::EngineModifier
friend class EngineModifier
Definition: flutter_windows_engine.h:324
flutter::FlutterWindowsEngine
Definition: flutter_windows_engine.h:89
flutter::FlutterWindowsEngine::MarkExternalTextureFrameAvailable
bool MarkExternalTextureFrameAvailable(int64_t texture_id)
Definition: flutter_windows_engine.cc:729
flutter::KeyboardKeyEmbedderHandler::GetKeyStateHandler
std::function< SHORT(int)> GetKeyStateHandler
Definition: keyboard_key_embedder_handler.h:41
flutter::FlutterWindowsEngine::window_proc_delegate_manager
WindowProcDelegateManager * window_proc_delegate_manager()
Definition: flutter_windows_engine.h:161
flutter::FlutterWindowsEngine::RegisterExternalTexture
bool RegisterExternalTexture(int64_t texture_id)
Definition: flutter_windows_engine.cc:719
flutter::FlutterWindowsEngine::running
virtual bool running() const
Definition: flutter_windows_engine.h:116
flutter::FlutterWindowsEngine::lifecycle_manager
WindowsLifecycleManager * lifecycle_manager()
Definition: flutter_windows_engine.h:287
flutter::FlutterWindowsEngine::messenger_wrapper
BinaryMessenger * messenger_wrapper()
Definition: flutter_windows_engine.h:151
accessibility_plugin.h
flutter::FlutterWindowsEngine::FlutterWindowsEngine
FlutterWindowsEngine(const FlutterProjectBundle &project, std::shared_ptr< WindowsProcTable > windows_proc_table=nullptr)
Definition: flutter_windows_engine.cc:146
flutter::FlutterWindowsEngine::OnQuit
void OnQuit(std::optional< HWND > hwnd, std::optional< WPARAM > wparam, std::optional< LPARAM > lparam, UINT exit_code)
Definition: flutter_windows_engine.cc:825
FlutterDesktopMessageResponseHandle
struct _FlutterPlatformMessageResponseHandle FlutterDesktopMessageResponseHandle
Definition: flutter_messenger.h:22
flutter::FlutterWindowsEngine::SetRootIsolateCreateCallback
void SetRootIsolateCreateCallback(const fml::closure &callback)
Definition: flutter_windows_engine.h:253
flutter::FlutterWindowsEngine::windows_proc_table
std::shared_ptr< WindowsProcTable > windows_proc_table()
Definition: flutter_windows_engine.h:291
flutter::FlutterWindowsEngine::UpdateAccessibilityFeatures
void UpdateAccessibilityFeatures()
Definition: flutter_windows_engine.cc:795
flutter::FlutterWindowsEngine::SetSwitches
void SetSwitches(const std::vector< std::string > &switches)
Definition: flutter_windows_engine.cc:232
keyboard_key_embedder_handler.h
flutter::FlutterWindowsEngine::~FlutterWindowsEngine
virtual ~FlutterWindowsEngine()
Definition: flutter_windows_engine.cc:227
windows_proc_table.h
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:574
flutter::FlutterWindowsEngine::OnPreEngineRestart
void OnPreEngineRestart()
Definition: flutter_windows_engine.cc:774
flutter::KeyboardKeyEmbedderHandler::MapVirtualKeyToScanCode
std::function< SHORT(UINT, bool)> MapVirtualKeyToScanCode
Definition: keyboard_key_embedder_handler.h:43
flutter::FlutterWindowsEngine::Stop
virtual bool Stop()
Definition: flutter_windows_engine.cc:479
flutter::FlutterWindowsEngine::messenger
FlutterDesktopMessengerRef messenger()
Definition: flutter_windows_engine.h:143
flutter::FlutterWindowsEngine::ProcessExternalWindowMessage
std::optional< LRESULT > ProcessExternalWindowMessage(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)
Definition: flutter_windows_engine.cc:843
flutter::BinaryMessenger
Definition: binary_messenger.h:28
flutter::FlutterWindowsEngine::OnDwmCompositionChanged
void OnDwmCompositionChanged()
Definition: flutter_windows_engine.cc:832
flutter::FlutterWindowsEngine::SendWindowMetricsEvent
void SendWindowMetricsEvent(const FlutterWindowMetricsEvent &event)
Definition: flutter_windows_engine.cc:553
app_lifecycle_state.h
flutter::FlutterWindowsEngine::DispatchSemanticsAction
bool DispatchSemanticsAction(uint64_t id, FlutterSemanticsAction action, fml::MallocMapping data)
Definition: flutter_windows_engine.cc:755
flutter::FlutterWindowsEngine::CreateKeyboardKeyHandler
virtual std::unique_ptr< KeyboardHandlerBase > CreateKeyboardKeyHandler(BinaryMessenger *messenger, KeyboardKeyEmbedderHandler::GetKeyStateHandler get_key_state, KeyboardKeyEmbedderHandler::MapVirtualKeyToScanCode map_vk_to_scan)
Definition: flutter_windows_engine.cc:696
flutter::FlutterWindowsTextureRegistrar
Definition: flutter_windows_texture_registrar.h:24
flutter::FlutterWindowsEngine::CreateView
std::unique_ptr< FlutterWindowsView > CreateView(std::unique_ptr< WindowBindingHandler > window)
Definition: flutter_windows_engine.cc:492
flutter::FlutterWindowsEngine::texture_registrar
FlutterWindowsTextureRegistrar * texture_registrar()
Definition: flutter_windows_engine.h:153
accessibility_bridge_windows.h
flutter::FlutterWindowsEngine::AddPluginRegistrarDestructionCallback
void AddPluginRegistrarDestructionCallback(FlutterDesktopOnPluginRegistrarDestroyed callback, FlutterDesktopPluginRegistrarRef registrar)
Definition: flutter_windows_engine.cc:547
proc_table.h
flutter::FlutterWindowsEngine::semantics_enabled
bool semantics_enabled() const
Definition: flutter_windows_engine.h:233
flutter_project_bundle.h
flutter::FlutterViewId
int64_t FlutterViewId
Definition: flutter_view.h:13
binary_messenger_impl.h
window_state.h
flutter::WindowProcDelegateManager
Definition: window_proc_delegate_manager.h:20
flutter
Definition: accessibility_bridge_windows.cc:11
flutter::egl::Manager
Definition: manager.h:31
flutter_desktop_messenger.h
flutter::TaskRunner
Definition: task_runner.h:26
flutter::FlutterWindowsEngine::SendPlatformMessageResponse
void SendPlatformMessageResponse(const FlutterDesktopMessageResponseHandle *handle, const uint8_t *data, size_t data_length)
Definition: flutter_windows_engine.cc:608
flutter::FlutterWindowsEngine::keyboard_key_handler
KeyboardHandlerBase * keyboard_key_handler()
Definition: flutter_windows_engine.h:176
FlutterDesktopOnPluginRegistrarDestroyed
void(* FlutterDesktopOnPluginRegistrarDestroyed)(FlutterDesktopPluginRegistrarRef)
Definition: flutter_plugin_registrar.h:23
flutter::FlutterWindowsEngine::SendKeyEvent
void SendKeyEvent(const FlutterKeyEvent &event, FlutterKeyEventCallback callback, void *user_data)
Definition: flutter_windows_engine.cc:566
flutter::FlutterWindowsEngine::message_dispatcher
IncomingMessageDispatcher * message_dispatcher()
Definition: flutter_windows_engine.h:145
keyboard_handler_base.h
basic_message_channel.h
flutter::FlutterWindowsEngine::text_input_plugin
TextInputPlugin * text_input_plugin()
Definition: flutter_windows_engine.h:179
platform_handler.h
manager.h
flutter::TextInputPlugin
Definition: text_input_plugin.h:28
flutter::FlutterWindowsEngine::ScheduleFrame
void ScheduleFrame()
Definition: flutter_windows_engine.cc:633
flutter::FlutterWindowsEngine::UpdateHighContrastMode
void UpdateHighContrastMode()
Definition: flutter_windows_engine.cc:799
FlutterDesktopMessengerRef
struct FlutterDesktopMessenger * FlutterDesktopMessengerRef
Definition: flutter_messenger.h:19
platform_view_plugin.h
flutter::KeyboardHandlerBase
Definition: keyboard_handler_base.h:18
flutter_windows.h
message
Win32Message message
Definition: keyboard_unittests.cc:137
action
int action
Definition: keyboard_key_handler_unittests.cc:116
flutter::AppLifecycleState
AppLifecycleState
Definition: app_lifecycle_state.h:32
compositor.h
flutter::FlutterWindowsEngine::UpdateSemanticsEnabled
void UpdateSemanticsEnabled(bool enabled)
Definition: flutter_windows_engine.cc:764
task_runner.h
cursor_handler.h
incoming_message_dispatcher.h
flutter::WindowsLifecycleManager
Definition: windows_lifecycle_manager.h:37
flutter::FlutterWindowsEngine::egl_manager
egl::Manager * egl_manager() const
Definition: flutter_windows_engine.h:159
accessibility_bridge.h
FlutterDesktopPluginRegistrar
Definition: window_state.h:23
flutter::FlutterWindowsEngine::OnWindowStateEvent
void OnWindowStateEvent(HWND hwnd, WindowStateEvent event)
Definition: flutter_windows_engine.cc:838
flutter::FlutterWindowsEngine::HandlePlatformMessage
void HandlePlatformMessage(const FlutterPlatformMessage *)
Definition: flutter_windows_engine.cc:615
flutter::FlutterWindowsEngine::Run
bool Run()
Definition: flutter_windows_engine.cc:237
flutter::WindowsPlatformThreadPrioritySetter
static void WindowsPlatformThreadPrioritySetter(FlutterThreadPriority priority)
Definition: flutter_windows_engine.h:59
texture_id
uint32_t texture_id
Definition: compositor_opengl.cc:20
flutter::FlutterWindowsEngine::ReloadSystemFonts
void ReloadSystemFonts()
Definition: flutter_windows_engine.cc:629
flutter::FlutterWindowsEngine::GetExecutableName
std::string GetExecutableName() const
Definition: flutter_windows_engine.cc:781
callback
FlutterDesktopBinaryReply callback
Definition: flutter_windows_view_unittests.cc:51