Flutter Engine
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 ()
 
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.

References FlutterDesktopPluginRegistrarGetView().

Referenced by ~PluginRegistrarWindows().

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

◆ ~PluginRegistrarWindows()

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

Definition at line 39 of file plugin_registrar_windows.h.

References flutter::PluginRegistrar::ClearPlugins(), operator=(), and PluginRegistrarWindows().

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

◆ 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.

Referenced by flutter::TEST().

50 { return view_.get(); }

◆ operator=()

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

Referenced by ~PluginRegistrarWindows().

◆ RegisterTopLevelWindowProcDelegate()

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

Definition at line 65 of file plugin_registrar_windows.h.

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

Referenced by flutter::TEST().

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  }
void FlutterDesktopPluginRegistrarRegisterTopLevelWindowProcDelegate(FlutterDesktopPluginRegistrarRef registrar, FlutterDesktopWindowProcCallback delegate, void *user_data)
FlutterDesktopPluginRegistrarRef registrar()

◆ UnregisterTopLevelWindowProcDelegate()

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

Definition at line 76 of file plugin_registrar_windows.h.

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

Referenced by flutter::TEST().

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

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