Flutter Engine
fl_dart_project.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_DART_PROJECT_H_
6 #define FLUTTER_SHELL_PLATFORM_LINUX_FL_DART_PROJECT_H_
7 
8 #include <glib-object.h>
9 
10 #if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION)
11 #error "Only <flutter_linux/flutter_linux.h> can be included directly."
12 #endif
13 
14 G_BEGIN_DECLS
15 
16 G_DECLARE_FINAL_TYPE(FlDartProject, fl_dart_project, FL, DART_PROJECT, GObject)
17 
18 /**
19  * FlDartProject:
20  *
21  * #FlDartProject represents a Dart project. It is used to provide information
22  * about the application when creating an #FlView.
23  */
24 
25 /**
26  * fl_dart_project_new:
27  *
28  * Creates a Flutter project for the currently running executable. The following
29  * data files are required relative to the location of the executable:
30  * - data/flutter_assets/ (as built by the Flutter tool).
31  * - data/icudtl.dat (provided as a resource by the Flutter tool).
32  * - lib/libapp.so (as built by the Flutter tool when in AOT mode).
33  *
34  * Returns: a new #FlDartProject.
35  */
36 FlDartProject* fl_dart_project_new();
37 
38 /**
39  * fl_dart_project_set_enable_mirrors:
40  * @project: an #FlDartProject.
41  * @enable_mirrors: %TRUE if the dart:mirrors library should be used.
42  *
43  * Sets if this Flutter project can use the dart:mirrors library.
44  *
45  * Deprecated: This function is temporary and will be removed in a future
46  * release.
47  */
48 void fl_dart_project_set_enable_mirrors(FlDartProject* project,
49  gboolean enable_mirrors) G_DEPRECATED;
50 
51 /**
52  * fl_dart_project_get_enable_mirrors:
53  * @project: an #FlDartProject.
54  *
55  * Gets if this Flutter project can use the dart:mirrors library.
56  *
57  * Returns: %TRUE if the dart:mirrors library can be used.
58  *
59  * Deprecated: This function is temporary and will be removed in a future
60  * release.
61  */
62 gboolean fl_dart_project_get_enable_mirrors(FlDartProject* project)
63  G_DEPRECATED;
64 
65 /**
66  * fl_dart_project_get_aot_library_path:
67  * @project: an #FlDartProject.
68  *
69  * Gets the path to the AOT library in the Flutter application.
70  *
71  * Returns: (type filename): an absolute file path, e.g.
72  * "/projects/my_dart_project/lib/libapp.so".
73  */
74 const gchar* fl_dart_project_get_aot_library_path(FlDartProject* project);
75 
76 /**
77  * fl_dart_project_get_assets_path:
78  * @project: an #FlDartProject.
79  *
80  * Gets the path to the directory containing the assets used in the Flutter
81  * application.
82  *
83  * Returns: (type filename): an absolute directory path, e.g.
84  * "/projects/my_dart_project/data/flutter_assets".
85  */
86 const gchar* fl_dart_project_get_assets_path(FlDartProject* project);
87 
88 /**
89  * fl_dart_project_get_icu_data_path:
90  * @project: an #FlDartProject.
91  *
92  * Gets the path to the ICU data file in the Flutter application.
93  *
94  * Returns: (type filename): an absolute file path, e.g.
95  * "/projects/my_dart_project/data/icudtl.dat".
96  */
97 const gchar* fl_dart_project_get_icu_data_path(FlDartProject* project);
98 
99 /**
100  * fl_dart_project_set_dart_entrypoint_arguments:
101  * @project: an #FlDartProject.
102  * @argv: a pointer to a NULL-terminated array of C strings containing the
103  * command line arguments.
104  *
105  * Sets the command line arguments to be passed through to the Dart
106  * entrypoint function.
107  */
108 void fl_dart_project_set_dart_entrypoint_arguments(FlDartProject* project,
109  char** argv);
110 
111 /**
112  * fl_dart_project_get_dart_entrypoint_arguments:
113  * @project: an #FlDartProject.
114  *
115  * Gets the command line arguments to be passed through to the Dart entrypoint
116  * function.
117  *
118  * Returns: a NULL-terminated array of strings containing the command line
119  * arguments to be passed to the Dart entrypoint.
120  */
121 gchar** fl_dart_project_get_dart_entrypoint_arguments(FlDartProject* project);
122 
123 G_END_DECLS
124 
125 #endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_DART_PROJECT_H_
gchar ** fl_dart_project_get_dart_entrypoint_arguments(FlDartProject *project)
void fl_dart_project_set_enable_mirrors(FlDartProject *project, gboolean enable_mirrors) G_DEPRECATED
gboolean fl_dart_project_get_enable_mirrors(FlDartProject *project) G_DEPRECATED
G_BEGIN_DECLS FlDartProject * fl_dart_project_new()
const gchar * fl_dart_project_get_assets_path(FlDartProject *project)
void fl_dart_project_set_dart_entrypoint_arguments(FlDartProject *project, char **argv)
const gchar * fl_dart_project_get_icu_data_path(FlDartProject *project)
G_BEGIN_DECLS G_DECLARE_FINAL_TYPE(FlKeyEventPlugin, fl_key_event_plugin, FL, KEY_EVENT_PLUGIN, GObject)
G_BEGIN_DECLS FL
const gchar * fl_dart_project_get_aot_library_path(FlDartProject *project)