Flutter Linux Embedder
fl_plugin_registrar.h File Reference
#include <glib-object.h>
#include <gmodule.h>
#include "fl_binary_messenger.h"
#include "fl_texture_registrar.h"
#include "fl_view.h"

Go to the source code of this file.

Functions

G_BEGIN_DECLS G_MODULE_EXPORT G_DECLARE_INTERFACE (FlPluginRegistrar, fl_plugin_registrar, FL, PLUGIN_REGISTRAR, GObject) struct _FlPluginRegistrarInterface
 
FlBinaryMessenger * fl_plugin_registrar_get_messenger (FlPluginRegistrar *registrar)
 
FlTextureRegistrar * fl_plugin_registrar_get_texture_registrar (FlPluginRegistrar *registrar)
 
FlView * fl_plugin_registrar_get_view (FlPluginRegistrar *registrar)
 

Function Documentation

◆ fl_plugin_registrar_get_messenger()

FlBinaryMessenger* fl_plugin_registrar_get_messenger ( FlPluginRegistrar *  registrar)

FlPluginRegistrar:

#FlPluginRegistrar is used when registering new plugins. fl_plugin_registrar_get_messenger: @registrar: an #FlPluginRegistrar.

Gets the messenger this plugin can communicate with.

Returns: an #FlBinaryMessenger.

Definition at line 113 of file fl_plugin_registrar.cc.

114  {
115  g_return_val_if_fail(FL_IS_PLUGIN_REGISTRAR(self), nullptr);
116 
117  return FL_PLUGIN_REGISTRAR_GET_IFACE(self)->get_messenger(self);
118 }

Referenced by TEST().

◆ fl_plugin_registrar_get_texture_registrar()

FlTextureRegistrar* fl_plugin_registrar_get_texture_registrar ( FlPluginRegistrar *  registrar)

fl_plugin_registrar_get_texture_registrar: @registrar: an #FlPluginRegistrar.

Gets the texture registrar this plugin can communicate with.

Returns: an #FlTextureRegistrar.

Definition at line 120 of file fl_plugin_registrar.cc.

121  {
122  g_return_val_if_fail(FL_IS_PLUGIN_REGISTRAR(self), nullptr);
123 
124  return FL_PLUGIN_REGISTRAR_GET_IFACE(self)->get_texture_registrar(self);
125 }

Referenced by TEST().

◆ fl_plugin_registrar_get_view()

FlView* fl_plugin_registrar_get_view ( FlPluginRegistrar *  registrar)

fl_plugin_registrar_get_view: @registrar: an #FlPluginRegistrar.

Get the view that Flutter is rendering with.

Returns: (allow-none): an #FlView or NULL if running in headless mode.

Definition at line 127 of file fl_plugin_registrar.cc.

127  {
128  g_return_val_if_fail(FL_IS_PLUGIN_REGISTRAR(self), nullptr);
129 
130  return FL_PLUGIN_REGISTRAR_GET_IFACE(self)->get_view(self);
131 }

◆ G_DECLARE_INTERFACE()

G_BEGIN_DECLS G_MODULE_EXPORT G_DECLARE_INTERFACE ( FlPluginRegistrar  ,
fl_plugin_registrar  ,
FL  ,
PLUGIN_REGISTRAR  ,
GObject   
)

Definition at line 22 of file fl_plugin_registrar.h.

28  {
29  GTypeInterface parent_iface;
30 
31  FlBinaryMessenger* (*get_messenger)(FlPluginRegistrar* registrar);
32 
33  FlTextureRegistrar* (*get_texture_registrar)(FlPluginRegistrar* registrar);
34 
35  FlView* (*get_view)(FlPluginRegistrar* registrar);
36 };