Flutter Engine
fl_plugin_registrar.h
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 #ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_PLUGIN_REGISTRAR_H_
6 #define FLUTTER_SHELL_PLATFORM_LINUX_FL_PLUGIN_REGISTRAR_H_
7 
8 #if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION)
9 #error "Only <flutter_linux/flutter_linux.h> can be included directly."
10 #endif
11 
12 #include <glib-object.h>
13 
14 #include "fl_binary_messenger.h"
15 #include "fl_view.h"
16 
17 G_BEGIN_DECLS
18 
19 G_DECLARE_FINAL_TYPE(FlPluginRegistrar,
20  fl_plugin_registrar,
21  FL,
22  PLUGIN_REGISTRAR,
23  GObject)
24 
25 /**
26  * FlPluginRegistrar:
27  *
28  * #FlPluginRegistrar is used when registering new plugins.
29  */
30 
31 /**
32  * fl_plugin_registrar_get_messenger:
33  * @registrar: an #FlPluginRegistrar.
34  *
35  * Gets the messenger this plugin can communicate with.
36  *
37  * Returns: an #FlBinaryMessenger.
38  */
39 FlBinaryMessenger* fl_plugin_registrar_get_messenger(
40  FlPluginRegistrar* registrar);
41 
42 /**
43  * fl_plugin_registrar_get_view:
44  * @registrar: an #FlPluginRegistrar.
45  *
46  * Get the view that Flutter is rendering with.
47  *
48  * Returns: (allow-none): an #FlView or %NULL if running in headless mode.
49  */
50 FlView* fl_plugin_registrar_get_view(FlPluginRegistrar* registrar);
51 
52 G_END_DECLS
53 
54 #endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_PLUGIN_REGISTRAR_H_
G_MODULE_EXPORT FlBinaryMessenger * fl_plugin_registrar_get_messenger(FlPluginRegistrar *self)
FlView * fl_plugin_registrar_get_view(FlPluginRegistrar *registrar)
G_BEGIN_DECLS G_DECLARE_FINAL_TYPE(FlPluginRegistrar, fl_plugin_registrar, FL, PLUGIN_REGISTRAR, GObject) FlBinaryMessenger *fl_plugin_registrar_get_messenger(FlPluginRegistrar *registrar)
G_BEGIN_DECLS FL