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 INCLUDE_DART_API_H_ | 7 #ifndef INCLUDE_DART_API_H_ |
8 #define INCLUDE_DART_API_H_ | 8 #define INCLUDE_DART_API_H_ |
9 | 9 |
10 /** \mainpage Dart Embedding API Reference | 10 /** \mainpage Dart Embedding API Reference |
(...skipping 2697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2708 * embedded in another file, for example in an html file. | 2708 * embedded in another file, for example in an html file. |
2709 * | 2709 * |
2710 * TODO(turnidge): Document. | 2710 * TODO(turnidge): Document. |
2711 * | 2711 * |
2712 * \param line_offset is the number of text lines before the | 2712 * \param line_offset is the number of text lines before the |
2713 * first line of the Dart script in the containing file. | 2713 * first line of the Dart script in the containing file. |
2714 * | 2714 * |
2715 * \param col_offset is the number of characters before the first character | 2715 * \param col_offset is the number of characters before the first character |
2716 * in the first line of the Dart script. | 2716 * in the first line of the Dart script. |
2717 */ | 2717 */ |
2718 DART_EXPORT Dart_Handle Dart_LoadScript(Dart_Handle url, | 2718 DART_EXPORT Dart_Handle Dart_LoadScript(Dart_Handle url, |
Cutch
2016/07/29 14:37:03
update API documentation for these methods?
turnidge
2016/07/29 17:37:37
Done, and then some. I decided to finally write s
| |
2719 Dart_Handle resolved_url, | |
2719 Dart_Handle source, | 2720 Dart_Handle source, |
2720 intptr_t line_offset, | 2721 intptr_t line_offset, |
2721 intptr_t col_offset); | 2722 intptr_t col_offset); |
2722 | 2723 |
2723 /** | 2724 /** |
2724 * Loads the root script for current isolate from a snapshot. | 2725 * Loads the root script for current isolate from a snapshot. |
2725 * | 2726 * |
2726 * \param buffer A buffer which contains a snapshot of the script. | 2727 * \param buffer A buffer which contains a snapshot of the script. |
2727 * \param length Length of the passed in buffer. | 2728 * \param length Length of the passed in buffer. |
2728 * | 2729 * |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2802 * | 2803 * |
2803 * \return If the VM handles the error, the return value is | 2804 * \return If the VM handles the error, the return value is |
2804 * a null handle. If it doesn't handle the error, the error | 2805 * a null handle. If it doesn't handle the error, the error |
2805 * object is returned. | 2806 * object is returned. |
2806 */ | 2807 */ |
2807 DART_EXPORT Dart_Handle Dart_LibraryHandleError(Dart_Handle library, | 2808 DART_EXPORT Dart_Handle Dart_LibraryHandleError(Dart_Handle library, |
2808 Dart_Handle error); | 2809 Dart_Handle error); |
2809 | 2810 |
2810 | 2811 |
2811 DART_EXPORT Dart_Handle Dart_LoadLibrary(Dart_Handle url, | 2812 DART_EXPORT Dart_Handle Dart_LoadLibrary(Dart_Handle url, |
2813 Dart_Handle resolved_url, | |
2812 Dart_Handle source, | 2814 Dart_Handle source, |
2813 intptr_t line_offset, | 2815 intptr_t line_offset, |
2814 intptr_t column_offset); | 2816 intptr_t column_offset); |
2815 | 2817 |
2816 /** | 2818 /** |
2817 * Imports a library into another library, optionally with a prefix. | 2819 * Imports a library into another library, optionally with a prefix. |
2818 * If no prefix is required, an empty string or Dart_Null() can be | 2820 * If no prefix is required, an empty string or Dart_Null() can be |
2819 * supplied. | 2821 * supplied. |
2820 * | 2822 * |
2821 * \param library The library into which to import another library. | 2823 * \param library The library into which to import another library. |
(...skipping 10 matching lines...) Expand all Loading... | |
2832 * Loads a source string into a library. | 2834 * Loads a source string into a library. |
2833 * | 2835 * |
2834 * \param library A library | 2836 * \param library A library |
2835 * \param url A url identifying the origin of the source | 2837 * \param url A url identifying the origin of the source |
2836 * \param source A string of Dart source | 2838 * \param source A string of Dart source |
2837 * | 2839 * |
2838 * \return A valid handle if no error occurs during the operation. | 2840 * \return A valid handle if no error occurs during the operation. |
2839 */ | 2841 */ |
2840 DART_EXPORT Dart_Handle Dart_LoadSource(Dart_Handle library, | 2842 DART_EXPORT Dart_Handle Dart_LoadSource(Dart_Handle library, |
2841 Dart_Handle url, | 2843 Dart_Handle url, |
2844 Dart_Handle resolved_url, | |
2842 Dart_Handle source, | 2845 Dart_Handle source, |
2843 intptr_t line_offset, | 2846 intptr_t line_offset, |
2844 intptr_t column_offset); | 2847 intptr_t column_offset); |
2845 /* TODO(turnidge): Rename to Dart_LibraryLoadSource? */ | 2848 /* TODO(turnidge): Rename to Dart_LibraryLoadSource? */ |
2846 | 2849 |
2847 | 2850 |
2848 /** | 2851 /** |
2849 * Loads a patch source string into a library. | 2852 * Loads a patch source string into a library. |
2850 * | 2853 * |
2851 * \param library A library | 2854 * \param library A library |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3071 /** | 3074 /** |
3072 * Returns whether the VM was initialized with a precompiled snapshot. Only | 3075 * Returns whether the VM was initialized with a precompiled snapshot. Only |
3073 * valid after Dart_Initialize. | 3076 * valid after Dart_Initialize. |
3074 * DEPRECATED. This is currently used to disable Platform.executable and | 3077 * DEPRECATED. This is currently used to disable Platform.executable and |
3075 * Platform.resolvedExecutable under precompilation to prevent process | 3078 * Platform.resolvedExecutable under precompilation to prevent process |
3076 * spawning tests from becoming fork-bombs. | 3079 * spawning tests from becoming fork-bombs. |
3077 */ | 3080 */ |
3078 DART_EXPORT bool Dart_IsRunningPrecompiledCode(); | 3081 DART_EXPORT bool Dart_IsRunningPrecompiledCode(); |
3079 | 3082 |
3080 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ | 3083 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ |
OLD | NEW |