Flutter Windows Embedder
flutter::PluginRegistrarWindows Class Reference

#include <plugin_registrar_windows.h>

Inheritance diagram for flutter::PluginRegistrarWindows:
flutter::PluginRegistrar

Public Member Functions

 PluginRegistrarWindows (FlutterDesktopPluginRegistrarRef core_registrar)
 
virtual ~PluginRegistrarWindows ()
 
 PluginRegistrarWindows (PluginRegistrarWindows const &)=delete
 
PluginRegistrarWindowsoperator= (PluginRegistrarWindows const &)=delete
 
FlutterViewGetView ()
 
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
 
PluginRegistraroperator= (PluginRegistrar const &)=delete
 
BinaryMessengermessenger ()
 
TextureRegistrartexture_registrar ()
 
void AddPlugin (std::unique_ptr< Plugin > plugin)
 

Additional Inherited Members

- Protected Member Functions inherited from flutter::PluginRegistrar
FlutterDesktopPluginRegistrarRef registrar ()
 
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)
inlineexplicit

Definition at line 32 of file plugin_registrar_windows.h.

34  : PluginRegistrar(core_registrar) {
35  view_ = std::make_unique<FlutterView>(
36  FlutterDesktopPluginRegistrarGetView(core_registrar));
37  }

References FlutterDesktopPluginRegistrarGetView().

◆ ~PluginRegistrarWindows()

virtual flutter::PluginRegistrarWindows::~PluginRegistrarWindows ( )
inlinevirtual

Definition at line 39 of file plugin_registrar_windows.h.

39  {
40  // Must be the first call.
41  ClearPlugins();
42  // Explicitly cleared to facilitate destruction order testing.
43  view_.reset();
44  }

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 50 of file plugin_registrar_windows.h.

50 { return view_.get(); }

Referenced by flutter::TEST().

◆ operator=()

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

◆ RegisterTopLevelWindowProcDelegate()

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

Definition at line 65 of file plugin_registrar_windows.h.

65  {
66  if (window_proc_delegates_.empty()) {
68  registrar(), PluginRegistrarWindows::OnTopLevelWindowProc, this);
69  }
70  int delegate_id = next_window_proc_delegate_id_++;
71  window_proc_delegates_.emplace(delegate_id, std::move(delegate));
72  return delegate_id;
73  }

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

Referenced by flutter::TEST().

◆ UnregisterTopLevelWindowProcDelegate()

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

Definition at line 76 of file plugin_registrar_windows.h.

76  {
77  window_proc_delegates_.erase(proc_id);
78  if (window_proc_delegates_.empty()) {
80  registrar(), PluginRegistrarWindows::OnTopLevelWindowProc);
81  }
82  }

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

Referenced by flutter::TEST().


The documentation for this class was generated from the following file:
FlutterDesktopPluginRegistrarGetView
FlutterDesktopViewRef FlutterDesktopPluginRegistrarGetView(FlutterDesktopPluginRegistrarRef registrar)
Definition: flutter_windows.cc:226
FlutterDesktopPluginRegistrarRegisterTopLevelWindowProcDelegate
void FlutterDesktopPluginRegistrarRegisterTopLevelWindowProcDelegate(FlutterDesktopPluginRegistrarRef registrar, FlutterDesktopWindowProcCallback delegate, void *user_data)
Definition: flutter_windows.cc:231
flutter::PluginRegistrar::registrar
FlutterDesktopPluginRegistrarRef registrar()
Definition: plugin_registrar.h:57
flutter::PluginRegistrar::ClearPlugins
void ClearPlugins()
Definition: plugin_registrar.cc:42
flutter::PluginRegistrar::PluginRegistrar
PluginRegistrar(FlutterDesktopPluginRegistrarRef core_registrar)
Definition: plugin_registrar.cc:19
FlutterDesktopPluginRegistrarUnregisterTopLevelWindowProcDelegate
void FlutterDesktopPluginRegistrarUnregisterTopLevelWindowProcDelegate(FlutterDesktopPluginRegistrarRef registrar, FlutterDesktopWindowProcCallback delegate)
Definition: flutter_windows.cc:239
delegate_id
int delegate_id
Definition: keyboard_key_handler_unittests.cc:113