blob: 6c7e5ad567355c7c1d0a4801e4b1430e0de46ddc [file] [log] [blame]
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_DART_PROJECT_H_
#define FLUTTER_SHELL_PLATFORM_LINUX_FL_DART_PROJECT_H_
#include <glib-object.h>
#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION)
#error "Only <flutter_linux/flutter_linux.h> can be included directly."
#endif
G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE(FlDartProject, fl_dart_project, FL, DART_PROJECT, GObject)
/**
* FlDartProject:
*
* #FlDartProject represents a Dart project. It is used to provide information
* about the application when creating an #FlView.
*/
/**
* fl_dart_project_new:
*
* Creates a Flutter project for the currently running executable. The following
* data files are required relative to the location of the executable:
* - data/flutter_assets/ (as built by the Flutter tool).
* - data/icudtl.dat (provided as a resource by the Flutter tool).
* - lib/libapp.so (as built by the Flutter tool when in AOT mode).
*
* Returns: a new #FlDartProject.
*/
FlDartProject* fl_dart_project_new();
/**
* fl_dart_project_get_aot_library_path:
* @project: an #FlDartProject.
*
* Gets the path to the AOT library in the Flutter application.
*
* Returns: (type filename): an absolute file path, e.g.
* "/projects/my_dart_project/lib/libapp.so".
*/
const gchar* fl_dart_project_get_aot_library_path(FlDartProject* project);
/**
* fl_dart_project_get_assets_path:
* @project: an #FlDartProject.
*
* Gets the path to the directory containing the assets used in the Flutter
* application.
*
* Returns: (type filename): an absolute directory path, e.g.
* "/projects/my_dart_project/data/flutter_assets".
*/
const gchar* fl_dart_project_get_assets_path(FlDartProject* project);
/**
* fl_dart_project_get_icu_data_path:
* @project: an #FlDartProject.
*
* Gets the path to the ICU data file in the Flutter application.
*
* Returns: (type filename): an absolute file path, e.g.
* "/projects/my_dart_project/data/icudtl.dat".
*/
const gchar* fl_dart_project_get_icu_data_path(FlDartProject* project);
G_END_DECLS
#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_DART_PROJECT_H_