| Flutter Windows Embedder |

Public Member Functions | List of all members
flutter::PluginRegistrarWindows Class Reference

`#include <plugin_registrar_windows.h>`

Inheritance diagram for flutter::PluginRegistrarWindows:

## Public Member Functions
| PluginRegistrarWindows (FlutterDesktopPluginRegistrarRef core_registrar)
virtual | ~PluginRegistrarWindows ()
| PluginRegistrarWindows (PluginRegistrarWindows const &)=delete
PluginRegistrarWindows & | operator= (PluginRegistrarWindows const &)=delete
FlutterView * | GetView ()
std::shared_ptr< FlutterView > | GetViewById (FlutterViewId view_id) const
int | RegisterTopLevelWindowProcDelegate (WindowProcDelegate delegate)
void | UnregisterTopLevelWindowProcDelegate (int proc_id)
Public Member Functions inherited from flutter::PluginRegistrar
| PluginRegistrar (FlutterDesktopPluginRegistrarRef core_registrar)
virtual | ~PluginRegistrar ()
| PluginRegistrar (PluginRegistrar const &)=delete
PluginRegistrar & | operator= (PluginRegistrar const &)=delete
BinaryMessenger * | messenger ()
TextureRegistrar * | texture_registrar ()
void | AddPlugin (std::unique_ptr< Plugin > plugin)

## Additional Inherited Members
Protected Member Functions inherited from flutter::PluginRegistrar
FlutterDesktopPluginRegistrarRef | registrar () const
void | ClearPlugins ()

## Detailed Description

Definition at line 28 of file plugin_registrar_windows.h.

## Constructor & Destructor Documentation

## ◆ PluginRegistrarWindows() [1/2]

flutter::PluginRegistrarWindows::PluginRegistrarWindows | ( | FlutterDesktopPluginRegistrarRef | core_registrar | ) |
| inline explicit

Definition at line 32 of file plugin_registrar_windows.h.

34 : PluginRegistrar(core_registrar) {
35 FlutterDesktopViewRef implicit_view =
36 FlutterDesktopPluginRegistrarGetView(core_registrar);
37 if (implicit_view) {
38 implicit_view_ = std::make_unique<FlutterView>(implicit_view);
39 }
40 }
flutter::PluginRegistrar::PluginRegistrar
PluginRegistrar(FlutterDesktopPluginRegistrarRef core_registrar)
Definition: plugin_registrar.cc:19
FlutterDesktopPluginRegistrarGetView
FlutterDesktopViewRef FlutterDesktopPluginRegistrarGetView(FlutterDesktopPluginRegistrarRef registrar)
Definition: flutter_windows.cc:296
FlutterDesktopViewRef
struct FlutterDesktopView * FlutterDesktopViewRef
Definition: flutter_windows.h:29

References FlutterDesktopPluginRegistrarGetView().

## ◆ ~PluginRegistrarWindows()

virtual flutter::PluginRegistrarWindows::~PluginRegistrarWindows | ( |  | ) |
| inline virtual

Definition at line 42 of file plugin_registrar_windows.h.

42 {
43 // Must be the first call.
44 ClearPlugins();
45 // Explicitly cleared to facilitate destruction order testing.
46 implicit_view_.reset();
47 }
flutter::PluginRegistrar::ClearPlugins
void ClearPlugins()
Definition: plugin_registrar.cc:42

References flutter::PluginRegistrar::ClearPlugins().

## ◆ PluginRegistrarWindows() [2/2]

flutter::PluginRegistrarWindows::PluginRegistrarWindows | ( | PluginRegistrarWindows const & |  | ) |
| delete

## Member Function Documentation

## ◆ GetView()

FlutterView* flutter::PluginRegistrarWindows::GetView | ( |  | ) |
| inline

Definition at line 59 of file plugin_registrar_windows.h.

59 { return implicit_view_.get(); }

Referenced by flutter::TEST().

## ◆ GetViewById()

std::shared_ptr<FlutterView> flutter::PluginRegistrarWindows::GetViewById | ( | FlutterViewId | view_id | ) | const
| inline

Definition at line 65 of file plugin_registrar_windows.h.

65 {
66 FlutterDesktopViewRef view =
67 FlutterDesktopPluginRegistrarGetViewById(registrar(), view_id);
68 if (!view) {
69 return nullptr;
70 }
71
72 return std::make_shared<FlutterView>(view);
73 }
flutter::PluginRegistrar::registrar
FlutterDesktopPluginRegistrarRef registrar() const
Definition: plugin_registrar.h:57
FlutterDesktopPluginRegistrarGetViewById
FlutterDesktopViewRef FlutterDesktopPluginRegistrarGetViewById(FlutterDesktopPluginRegistrarRef registrar, FlutterDesktopViewId view_id)
Definition: flutter_windows.cc:301

References FlutterDesktopPluginRegistrarGetViewById(), and flutter::PluginRegistrar::registrar().

Referenced by flutter::TEST().

## ◆ operator=()

PluginRegistrarWindows& flutter::PluginRegistrarWindows::operator= | ( | PluginRegistrarWindows const & |  | ) |
| delete

## ◆ RegisterTopLevelWindowProcDelegate()

int flutter::PluginRegistrarWindows::RegisterTopLevelWindowProcDelegate | ( | WindowProcDelegate | delegate | ) |
| inline

Definition at line 88 of file plugin_registrar_windows.h.

88 {
89 if (window_proc_delegates_.empty()) {
90 FlutterDesktopPluginRegistrarRegisterTopLevelWindowProcDelegate(
91 registrar(), PluginRegistrarWindows::OnTopLevelWindowProc, this);
92 }
93 int delegate_id = next_window_proc_delegate_id_++;
94 window_proc_delegates_.emplace(delegate_id, std::move(delegate));
95 return delegate_id;
96 }
FlutterDesktopPluginRegistrarRegisterTopLevelWindowProcDelegate
void FlutterDesktopPluginRegistrarRegisterTopLevelWindowProcDelegate(FlutterDesktopPluginRegistrarRef registrar, FlutterDesktopWindowProcCallback delegate, void *user_data)
Definition: flutter_windows.cc:307
delegate_id
int delegate_id
Definition: keyboard_key_handler_unittests.cc:113

References delegate_id, FlutterDesktopPluginRegistrarRegisterTopLevelWindowProcDelegate(), and flutter::PluginRegistrar::registrar().

Referenced by flutter::TEST().

## ◆ UnregisterTopLevelWindowProcDelegate()

void flutter::PluginRegistrarWindows::UnregisterTopLevelWindowProcDelegate | ( | int | proc_id | ) |
| inline

Definition at line 99 of file plugin_registrar_windows.h.

99 {
100 window_proc_delegates_.erase(proc_id);
101 if (window_proc_delegates_.empty()) {
102 FlutterDesktopPluginRegistrarUnregisterTopLevelWindowProcDelegate(
103 registrar(), PluginRegistrarWindows::OnTopLevelWindowProc);
104 }
105 }
FlutterDesktopPluginRegistrarUnregisterTopLevelWindowProcDelegate
void FlutterDesktopPluginRegistrarUnregisterTopLevelWindowProcDelegate(FlutterDesktopPluginRegistrarRef registrar, FlutterDesktopWindowProcCallback delegate)
Definition: flutter_windows.cc:315

References FlutterDesktopPluginRegistrarUnregisterTopLevelWindowProcDelegate(), and flutter::PluginRegistrar::registrar().

Referenced by flutter::TEST().

The documentation for this class was generated from the following file:

- shell/platform/windows/client_wrapper/include/flutter/plugin_registrar_windows.h