Flutter Engine
fl_plugin_registry.cc
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "flutter/shell/platform/linux/public/flutter_linux/fl_plugin_registry.h"
6 
7 #include <gmodule.h>
8 
9 // Added here to stop the compiler from optimising this function away.
10 G_MODULE_EXPORT GType fl_plugin_registry_get_type();
11 
12 G_DEFINE_INTERFACE(FlPluginRegistry, fl_plugin_registry, G_TYPE_OBJECT)
13 
14 void fl_plugin_registry_default_init(FlPluginRegistryInterface* self) {}
15 
16 G_MODULE_EXPORT FlPluginRegistrar* fl_plugin_registry_get_registrar_for_plugin(
17  FlPluginRegistry* self,
18  const gchar* name) {
19  g_return_val_if_fail(FL_IS_PLUGIN_REGISTRY(self), nullptr);
20  g_return_val_if_fail(name != nullptr, nullptr);
21 
22  return FL_PLUGIN_REGISTRY_GET_IFACE(self)->get_registrar_for_plugin(self,
23  name);
24 }
void fl_plugin_registry_default_init(FlPluginRegistryInterface *self)
const char * name
Definition: fuchsia.cc:50
G_MODULE_EXPORT FlPluginRegistrar * fl_plugin_registry_get_registrar_for_plugin(FlPluginRegistry *self, const gchar *name)
G_MODULE_EXPORT GType fl_plugin_registry_get_type()