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 2685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2696 * | 2696 * |
2697 * \return A valid handle if the native resolver was set successfully. | 2697 * \return A valid handle if the native resolver was set successfully. |
2698 */ | 2698 */ |
2699 DART_EXPORT Dart_Handle | 2699 DART_EXPORT Dart_Handle |
2700 Dart_SetNativeResolver(Dart_Handle library, | 2700 Dart_SetNativeResolver(Dart_Handle library, |
2701 Dart_NativeEntryResolver resolver, | 2701 Dart_NativeEntryResolver resolver, |
2702 Dart_NativeEntrySymbol symbol); | 2702 Dart_NativeEntrySymbol symbol); |
2703 /* TODO(turnidge): Rename to Dart_LibrarySetNativeResolver? */ | 2703 /* TODO(turnidge): Rename to Dart_LibrarySetNativeResolver? */ |
2704 | 2704 |
2705 | 2705 |
| 2706 /** |
| 2707 * Returns the callback used to resolve native functions for a library. |
| 2708 * |
| 2709 * \param library A library. |
| 2710 * \param resolver a pointer to a Dart_NativeEntryResolver |
| 2711 * |
| 2712 * \return A valid handle if the library was found. |
| 2713 */ |
| 2714 DART_EXPORT Dart_Handle |
| 2715 Dart_GetNativeResolver(Dart_Handle library, Dart_NativeEntryResolver* resolver); |
| 2716 |
| 2717 |
| 2718 /** |
| 2719 * Returns the callback used to resolve native function symbols for a library. |
| 2720 * |
| 2721 * \param library A library. |
| 2722 * \param resolver a pointer to a Dart_NativeEntrySymbol. |
| 2723 * |
| 2724 * \return A valid handle if the library was found. |
| 2725 */ |
| 2726 DART_EXPORT Dart_Handle Dart_GetNativeSymbol(Dart_Handle library, |
| 2727 Dart_NativeEntrySymbol* resolver); |
| 2728 |
| 2729 |
2706 /* | 2730 /* |
2707 * ===================== | 2731 * ===================== |
2708 * Scripts and Libraries | 2732 * Scripts and Libraries |
2709 * ===================== | 2733 * ===================== |
2710 */ | 2734 */ |
2711 | 2735 |
2712 typedef enum { | 2736 typedef enum { |
2713 Dart_kCanonicalizeUrl = 0, | 2737 Dart_kCanonicalizeUrl = 0, |
2714 Dart_kScriptTag, | 2738 Dart_kScriptTag, |
2715 Dart_kSourceTag, | 2739 Dart_kSourceTag, |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3230 | 3254 |
3231 | 3255 |
3232 /** | 3256 /** |
3233 * Returns whether the VM only supports running from precompiled snapshots and | 3257 * Returns whether the VM only supports running from precompiled snapshots and |
3234 * not from any other kind of snapshot or from source (that is, the VM was | 3258 * not from any other kind of snapshot or from source (that is, the VM was |
3235 * compiled with DART_PRECOMPILED_RUNTIME). | 3259 * compiled with DART_PRECOMPILED_RUNTIME). |
3236 */ | 3260 */ |
3237 DART_EXPORT bool Dart_IsPrecompiledRuntime(); | 3261 DART_EXPORT bool Dart_IsPrecompiledRuntime(); |
3238 | 3262 |
3239 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ | 3263 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ |
OLD | NEW |