| Flutter Linux Embedder |

fl_engine.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_PUBLIC_FLUTTER_LINUX_FL_ENGINE_H_
6 #define FLUTTER_SHELL_PLATFORM_LINUX_PUBLIC_FLUTTER_LINUX_FL_ENGINE_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_dart_project.h"
17 #include "fl_texture_registrar.h"
18
19 G_BEGIN_DECLS
20
21 G_MODULE_EXPORT
22 G_DECLARE_FINAL_TYPE(FlEngine, fl_engine, FL, ENGINE, GObject)
23
24 /**
25 * FlEngine:
26 *
27 * #FlEngine is an object that contains a running Flutter engine.
28 */
29
30 /**
31 * fl_engine_new:
32 * @project: an #FlDartProject.
33 *
34 * Creates new Flutter engine.
35 *
36 * Returns: a new #FlEngine.
37 */
38 FlEngine* fl_engine_new(FlDartProject* project);
39
40 /**
41 * fl_engine_new_headless:
42 * @project: an #FlDartProject.
43 *
44 * Creates new Flutter engine running in headless mode.
45 *
46 * Returns: a new #FlEngine.
47 */
48 FlEngine* fl_engine_new_headless(FlDartProject* project);
49
50 /**
51 * fl_engine_get_binary_messenger:
52 * @engine: an #FlEngine.
53 *
54 * Gets the messenger to communicate with this engine.
55 *
56 * Returns: an #FlBinaryMessenger.
57 */
58 FlBinaryMessenger* fl_engine_get_binary_messenger(FlEngine* engine);
59
60 /**
61 * fl_engine_get_texture_registrar:
62 * @engine: an #FlEngine.
63 *
64 * Gets the texture registrar for registering textures.
65 *
66 * Returns: an #FlTextureRegistrar.
67 */
68 FlTextureRegistrar* fl_engine_get_texture_registrar(FlEngine* engine);
69
70 G_END_DECLS
71
72 #endif // FLUTTER_SHELL_PLATFORM_LINUX_PUBLIC_FLUTTER_LINUX_FL_ENGINE_H_
fl_engine_new
G_BEGIN_DECLS G_MODULE_EXPORT FlEngine * fl_engine_new(FlDartProject *project)
Definition: fl_engine.cc:494
fl_dart_project.h
fl_binary_messenger.h
fl_engine_get_binary_messenger
FlBinaryMessenger * fl_engine_get_binary_messenger(FlEngine *engine)
Definition: fl_engine.cc:995
fl_texture_registrar.h
G_DECLARE_FINAL_TYPE
G_BEGIN_DECLS G_DECLARE_FINAL_TYPE(FlAccessibleTextField, fl_accessible_text_field, FL, ACCESSIBLE_TEXT_FIELD, FlAccessibleNode)
FL
FL
Definition: fl_binary_messenger.cc:27
fl_engine_new_headless
FlEngine * fl_engine_new_headless(FlDartProject *project)
Definition: fl_engine.cc:499
fl_engine_get_texture_registrar
FlTextureRegistrar * fl_engine_get_texture_registrar(FlEngine *engine)
Definition: fl_engine.cc:1011