| Flutter Linux Embedder |

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 #include <gmodule.h>
14
15 #include "fl_binary_messenger.h"
16 #include "fl_texture_registrar.h"
17 #include "fl_view.h"
18
19 G_BEGIN_DECLS
20
21 G_MODULE_EXPORT
22 G_DECLARE_INTERFACE(FlPluginRegistrar,
23 fl_plugin_registrar,
24 FL,
25 PLUGIN_REGISTRAR,
26 GObject)
27
28 struct _FlPluginRegistrarInterface {
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 };
37
38 /**
39 * FlPluginRegistrar:
40 *
41 * #FlPluginRegistrar is used when registering new plugins.
42 */
43
44 /**
45 * fl_plugin_registrar_get_messenger:
46 * @registrar: an #FlPluginRegistrar.
47 *
48 * Gets the messenger this plugin can communicate with.
49 *
50 * Returns: an #FlBinaryMessenger.
51 */
52 FlBinaryMessenger* fl_plugin_registrar_get_messenger(
53 FlPluginRegistrar* registrar);
54
55 /**
56 * fl_plugin_registrar_get_texture_registrar:
57 * @registrar: an #FlPluginRegistrar.
58 *
59 * Gets the texture registrar this plugin can communicate with.
60 *
61 * Returns: an #FlTextureRegistrar.
62 */
63 FlTextureRegistrar* fl_plugin_registrar_get_texture_registrar(
64 FlPluginRegistrar* registrar);
65
66 /**
67 * fl_plugin_registrar_get_view:
68 * @registrar: an #FlPluginRegistrar.
69 *
70 * Get the view that Flutter is rendering with.
71 *
72 * Returns: (allow-none): an #FlView or %NULL if running in headless mode.
73 */
74 FlView* fl_plugin_registrar_get_view(FlPluginRegistrar* registrar);
75
76 G_END_DECLS
77
78 #endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_PLUGIN_REGISTRAR_H_
fl_plugin_registrar_get_texture_registrar
FlTextureRegistrar * fl_plugin_registrar_get_texture_registrar(FlPluginRegistrar *registrar)
Definition: fl_plugin_registrar.cc:120
fl_plugin_registrar_get_view
FlView * fl_plugin_registrar_get_view(FlPluginRegistrar *registrar)
Definition: fl_plugin_registrar.cc:127
fl_binary_messenger.h
fl_plugin_registrar_get_messenger
FlBinaryMessenger * fl_plugin_registrar_get_messenger(FlPluginRegistrar *registrar)
Definition: fl_plugin_registrar.cc:113
G_DECLARE_INTERFACE
G_BEGIN_DECLS G_MODULE_EXPORT G_DECLARE_INTERFACE(FlPluginRegistrar, fl_plugin_registrar, FL, PLUGIN_REGISTRAR, GObject) struct _FlPluginRegistrarInterface
Definition: fl_plugin_registrar.h:22
fl_texture_registrar.h
FL
FL
Definition: fl_binary_messenger.cc:27
fl_view.h