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_texture_registrar.h"
16 #include "fl_view.h"
17 
18 G_BEGIN_DECLS
19 
20 G_DECLARE_FINAL_TYPE(FlPluginRegistrar,
21  fl_plugin_registrar,
22  FL,
23  PLUGIN_REGISTRAR,
24  GObject)
25 
26 /**
27  * FlPluginRegistrar:
28  *
29  * #FlPluginRegistrar is used when registering new plugins.
30  */
31 
32 /**
33  * fl_plugin_registrar_get_messenger:
34  * @registrar: an #FlPluginRegistrar.
35  *
36  * Gets the messenger this plugin can communicate with.
37  *
38  * Returns: an #FlBinaryMessenger.
39  */
40 FlBinaryMessenger* fl_plugin_registrar_get_messenger(
41  FlPluginRegistrar* registrar);
42 
43 /**
44  * fl_plugin_registrar_get_texture_registrar:
45  * @registrar: an #FlPluginRegistrar.
46  *
47  * Gets the texture registrar this plugin can communicate with.
48  *
49  * Returns: an #FlTextureRegistrar.
50  */
52  FlPluginRegistrar* registrar);
53 
54 /**
55  * fl_plugin_registrar_get_view:
56  * @registrar: an #FlPluginRegistrar.
57  *
58  * Get the view that Flutter is rendering with.
59  *
60  * Returns: (allow-none): an #FlView or %NULL if running in headless mode.
61  */
62 FlView* fl_plugin_registrar_get_view(FlPluginRegistrar* registrar);
63 
64 G_END_DECLS
65 
66 #endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_PLUGIN_REGISTRAR_H_
FlTextureRegistrar * fl_plugin_registrar_get_texture_registrar(FlPluginRegistrar *registrar)
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