OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 2 * Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
3 * for details. All rights reserved. Use of this source code is governed by a | 3 * for details. All rights reserved. Use of this source code is governed by a |
4 * BSD-style license that can be found in the LICENSE file. | 4 * BSD-style license that can be found in the LICENSE file. |
5 */ | 5 */ |
6 | 6 |
7 #ifndef RUNTIME_INCLUDE_DART_API_H_ | 7 #ifndef RUNTIME_INCLUDE_DART_API_H_ |
8 #define RUNTIME_INCLUDE_DART_API_H_ | 8 #define RUNTIME_INCLUDE_DART_API_H_ |
9 | 9 |
10 /** \mainpage Dart Embedding API Reference | 10 /** \mainpage Dart Embedding API Reference |
(...skipping 2688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2699 * | 2699 * |
2700 * This tag indicates that the embedder should canonicalize 'url' with | 2700 * This tag indicates that the embedder should canonicalize 'url' with |
2701 * respect to 'library'. For most embedders, the | 2701 * respect to 'library'. For most embedders, the |
2702 * Dart_DefaultCanonicalizeUrl function is a sufficient implementation | 2702 * Dart_DefaultCanonicalizeUrl function is a sufficient implementation |
2703 * of this tag. The return value should be a string holding the | 2703 * of this tag. The return value should be a string holding the |
2704 * canonicalized url. | 2704 * canonicalized url. |
2705 * | 2705 * |
2706 * Dart_kScriptTag | 2706 * Dart_kScriptTag |
2707 * | 2707 * |
2708 * This tag indicates that the root script should be loaded from | 2708 * This tag indicates that the root script should be loaded from |
2709 * 'url'. The 'library' parameter will always be null. Once the root | 2709 * 'url'. If the 'library' parameter is not null, it is the url of the |
| 2710 * package map that should be used when loading. Once the root |
2710 * script is loaded, the embedder should call Dart_LoadScript to | 2711 * script is loaded, the embedder should call Dart_LoadScript to |
2711 * install the root script in the VM. The return value should be an | 2712 * install the root script in the VM. The return value should be an |
2712 * error or null. | 2713 * error or null. |
2713 * | 2714 * |
2714 * Dart_kSourceTag | 2715 * Dart_kSourceTag |
2715 * | 2716 * |
2716 * This tag is used to load a file referenced by Dart language "part | 2717 * This tag is used to load a file referenced by Dart language "part |
2717 * of" directive. Once the file's source is loaded, the embedder | 2718 * of" directive. Once the file's source is loaded, the embedder |
2718 * should call Dart_LoadSource to provide the file contents to the VM. | 2719 * should call Dart_LoadSource to provide the file contents to the VM. |
2719 * The return value should be an error or null. | 2720 * The return value should be an error or null. |
2720 * | 2721 * |
2721 * Dart_kImportTag | 2722 * Dart_kImportTag |
2722 * | 2723 * |
2723 * This tag is used to load a script referenced by Dart language | 2724 * This tag is used to load a script referenced by Dart language |
2724 * "import" directive. Once the script is loaded, the embedder should | 2725 * "import" directive. Once the script is loaded, the embedder should |
2725 * call Dart_LoadLibrary to provide the script source to the VM. The | 2726 * call Dart_LoadLibrary to provide the script source to the VM. The |
2726 * return value should be an error or null. | 2727 * return value should be an error or null. |
2727 */ | 2728 */ |
2728 typedef Dart_Handle (*Dart_LibraryTagHandler)(Dart_LibraryTag tag, | 2729 typedef Dart_Handle (*Dart_LibraryTagHandler)( |
2729 Dart_Handle library, | 2730 Dart_LibraryTag tag, |
2730 Dart_Handle url); | 2731 Dart_Handle library_or_package_map_url, |
| 2732 Dart_Handle url); |
2731 | 2733 |
2732 /** | 2734 /** |
2733 * Sets library tag handler for the current isolate. This handler is | 2735 * Sets library tag handler for the current isolate. This handler is |
2734 * used to handle the various tags encountered while loading libraries | 2736 * used to handle the various tags encountered while loading libraries |
2735 * or scripts in the isolate. | 2737 * or scripts in the isolate. |
2736 * | 2738 * |
2737 * \param handler Handler code to be used for handling the various tags | 2739 * \param handler Handler code to be used for handling the various tags |
2738 * encountered while loading libraries or scripts in the isolate. | 2740 * encountered while loading libraries or scripts in the isolate. |
2739 * | 2741 * |
2740 * \return If no error occurs, the handler is set for the isolate. | 2742 * \return If no error occurs, the handler is set for the isolate. |
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3200 | 3202 |
3201 | 3203 |
3202 /** | 3204 /** |
3203 * Returns whether the VM only supports running from precompiled snapshots and | 3205 * Returns whether the VM only supports running from precompiled snapshots and |
3204 * not from any other kind of snapshot or from source (that is, the VM was | 3206 * not from any other kind of snapshot or from source (that is, the VM was |
3205 * compiled with DART_PRECOMPILED_RUNTIME). | 3207 * compiled with DART_PRECOMPILED_RUNTIME). |
3206 */ | 3208 */ |
3207 DART_EXPORT bool Dart_IsPrecompiledRuntime(); | 3209 DART_EXPORT bool Dart_IsPrecompiledRuntime(); |
3208 | 3210 |
3209 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ | 3211 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ |
OLD | NEW |