@@ -1345,26 +1345,27 @@ typedef void (*FlutterLogMessageCallback)(const char* /* tag */,
13451345/// FlutterEngine instance in AOT mode.
13461346typedef struct _FlutterEngineAOTData * FlutterEngineAOTData ;
13471347
1348- /// An immutable buffer of potentially shared data.
1348+ /// An immutable buffer of potentially shared data.
13491349typedef struct {
13501350 /// The size of the struct. Must be sizeof(FlutterEngineMapping).
13511351 size_t struct_size ;
13521352
13531353 /// A pointer to the data accessed by the Flutter Engine. The data will not be
1354- /// mutated by the Flutter Engine, and must not be mutated by the Embedder until
1355- /// the mapping is destroyed.
1354+ /// mutated by the Flutter Engine, and must not be mutated by the Embedder
1355+ /// until the mapping is destroyed.
13561356 const uint8_t * data ;
13571357 /// The size of the data backed by this mapping. The data must be valid for
1358- /// reading until this point. Bytes past the end are undefined and not accessed
1359- /// by the Engine.
1358+ /// reading until this point. Bytes past the end are undefined and not
1359+ /// accessed by the Engine.
13601360 size_t data_size ;
13611361
1362- /// An opaque baton passed back to the embedder when the destruction_callback is
1363- /// invoked. The engine does not interpret this field in any way.
1362+ /// An opaque baton passed back to the embedder when the destruction_callback
1363+ /// is invoked. The engine does not interpret this field in any way.
13641364 void * user_data ;
1365- /// Called once by the engine to destroy this mapping. The `user_data` specified
1366- /// above is passed in as the only argument. This call may mutate/free/unmap the
1367- /// data, as it will no longer be accessed by the Flutter Engine.
1365+ /// Called once by the engine to destroy this mapping. The `user_data`
1366+ /// specified above is passed in as the only argument. This call may
1367+ /// mutate/free/unmap the data, as it will no longer be accessed by the
1368+ /// Flutter Engine.
13681369 VoidCallback destruction_callback ;
13691370} FlutterEngineMappingCreateInfo ;
13701371
@@ -1375,22 +1376,23 @@ typedef struct FlutterEngineMappingPrivate* FlutterEngineMapping;
13751376/// This may be called by multiple threads.
13761377///
13771378/// The `asset_name` parameter contains the path to the asset to load.
1378- /// `user_data` is the user data from `FlutterEngineAssetResolver`, registered via
1379- /// `FlutterProjectArgs`.
1379+ /// `user_data` is the user data from `FlutterEngineAssetResolver`, registered
1380+ /// via `FlutterProjectArgs`.
13801381///
13811382/// If the asset was found and successfully loaded, return a valid
1382- /// `FlutterEngineMapping`. Otherwise return NULL to indicate an error occurred
1383+ /// `FlutterEngineMapping`. Otherwise return NULL to indicate an error occurred
13831384/// while loading the asset.
13841385///
1385- /// Note that the returned `FlutterEngineMapping` is owned by the Engine and should
1386- /// be cached or reused. Each callback invocation must return a new
1387- /// FlutterEngineMapping. Multiple mappings may refer to the same area in memory,
1388- /// proper book-keeping is up to the embedder.
1389- typedef FlutterEngineMapping (* FlutterAssetResolverGetAssetCallback )(const char * /* asset_name */ ,
1390- void * /* user_data */ );
1386+ /// Note that the returned `FlutterEngineMapping` is owned by the Engine and
1387+ /// should be cached or reused. Each callback invocation must return a new
1388+ /// FlutterEngineMapping. Multiple mappings may refer to the same area in
1389+ /// memory, proper book-keeping is up to the embedder.
1390+ typedef FlutterEngineMapping (* FlutterAssetResolverGetAssetCallback )(
1391+ const char * /* asset_name */ ,
1392+ void * /* user_data */ );
13911393
1392- /// Resolves assets on the behalf of the Flutter Engine, instead of accessing the
1393- /// filesystem directly.
1394+ /// Resolves assets on the behalf of the Flutter Engine, instead of accessing
1395+ /// the filesystem directly.
13941396typedef struct {
13951397 /// The size of the struct. Must be sizeof(FlutterEngineAssetResolver).
13961398 size_t struct_size ;
@@ -1413,9 +1415,10 @@ typedef struct {
14131415 ///
14141416 /// If `asset_resolver` is provided, may be NULL.
14151417 ///
1416- /// If both `asset_resolver` and `assets_path` are provided, the `asset_resolver`
1417- /// comes first in the asset search order, then `assets_path`. This effectively
1418- /// makes `asset_resolver` an overlay over `assets_path`.
1418+ /// If both `asset_resolver` and `assets_path` are provided, the
1419+ /// `asset_resolver` comes first in the asset search order, then
1420+ /// `assets_path`. This effectively makes `asset_resolver` an overlay over
1421+ /// `assets_path`.
14191422 const char * assets_path ;
14201423 /// The path to the Dart file containing the `main` entry point.
14211424 /// The string can be collected after the call to `FlutterEngineRun` returns.
@@ -1659,9 +1662,10 @@ typedef struct {
16591662 ///
16601663 /// If `assets_path` is provided, may be NULL.
16611664 ///
1662- /// If both `asset_resolver` and `assets_path` are provided, the `asset_resolver`
1663- /// comes first in the asset search order, then `assets_path`. This effectively
1664- /// makes `asset_resolver` an overlay over `assets_path`.
1665+ /// If both `asset_resolver` and `assets_path` are provided, the
1666+ /// `asset_resolver` comes first in the asset search order, then
1667+ /// `assets_path`. This effectively makes `asset_resolver` an overlay over
1668+ /// `assets_path`.
16651669 const FlutterEngineAssetResolver * asset_resolver ;
16661670} FlutterProjectArgs ;
16671671
0 commit comments