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