Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
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 ()
 
std::shared_ptr< FlutterViewGetViewById (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
 
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 () 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)
inlineexplicit

Definition at line 32 of file plugin_registrar_windows.h.

34 : PluginRegistrar(core_registrar) {
35 FlutterDesktopViewRef implicit_view =
37 if (implicit_view) {
38 implicit_view_ = std::make_unique<FlutterView>(implicit_view);
39 }
40 }
PluginRegistrar(FlutterDesktopPluginRegistrarRef core_registrar)
struct FlutterDesktopView * FlutterDesktopViewRef
FlutterDesktopViewRef FlutterDesktopPluginRegistrarGetView(FlutterDesktopPluginRegistrarRef controller)

◆ ~PluginRegistrarWindows()

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

Definition at line 42 of file plugin_registrar_windows.h.

42 {
43 // Must be the first call.
45 // Explicitly cleared to facilitate destruction order testing.
46 implicit_view_.reset();
47 }

◆ 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(); }

◆ GetViewById()

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

Definition at line 65 of file plugin_registrar_windows.h.

65 {
68 if (!view) {
69 return nullptr;
70 }
71
72 return std::make_shared<FlutterView>(view);
73 }
FlutterDesktopPluginRegistrarRef registrar() const
FlutterDesktopViewRef FlutterDesktopPluginRegistrarGetViewById(FlutterDesktopPluginRegistrarRef controller, FlutterDesktopViewId view_id)

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

◆ 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()) {
103 registrar(), PluginRegistrarWindows::OnTopLevelWindowProc);
104 }
105 }
void FlutterDesktopPluginRegistrarUnregisterTopLevelWindowProcDelegate(FlutterDesktopPluginRegistrarRef registrar, FlutterDesktopWindowProcCallback delegate)

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