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 2666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2677 * | 2677 * |
2678 * \return If no error occurs, the handler is set for the isolate. | 2678 * \return If no error occurs, the handler is set for the isolate. |
2679 * Otherwise an error handle is returned. | 2679 * Otherwise an error handle is returned. |
2680 * | 2680 * |
2681 * TODO(turnidge): Document. | 2681 * TODO(turnidge): Document. |
2682 */ | 2682 */ |
2683 DART_EXPORT Dart_Handle Dart_SetLibraryTagHandler( | 2683 DART_EXPORT Dart_Handle Dart_SetLibraryTagHandler( |
2684 Dart_LibraryTagHandler handler); | 2684 Dart_LibraryTagHandler handler); |
2685 | 2685 |
2686 /** | 2686 /** |
| 2687 * Canonicalizes a url with respect to some library. |
| 2688 * |
| 2689 * The url is resolved with respect to the library's url and some url |
| 2690 * normalizations are performed. |
| 2691 * |
| 2692 * This canonicalization function should be sufficient for most |
| 2693 * embedders to implement the Dart_kCanonicalizeUrl tag. |
| 2694 * |
| 2695 * \param library The library relative to which the url is being |
| 2696 * resolved. |
| 2697 * \param url The url being resolved and canonicalized. This |
| 2698 * parameter is a string handle. |
| 2699 * |
| 2700 * \return If no error occurs, a String object is returned. Otherwise |
| 2701 * an error handle is returned. |
| 2702 */ |
| 2703 DART_EXPORT Dart_Handle Dart_DefaultCanonicalizeUrl(Dart_Handle library, |
| 2704 Dart_Handle url); |
| 2705 |
| 2706 /** |
2687 * Loads the root script for the current isolate. The script can be | 2707 * Loads the root script for the current isolate. The script can be |
2688 * embedded in another file, for example in an html file. | 2708 * embedded in another file, for example in an html file. |
2689 * | 2709 * |
2690 * TODO(turnidge): Document. | 2710 * TODO(turnidge): Document. |
2691 * | 2711 * |
2692 * \line_offset is the number of text lines before the | 2712 * \param line_offset is the number of text lines before the |
2693 * first line of the Dart script in the containing file. | 2713 * first line of the Dart script in the containing file. |
2694 * | 2714 * |
2695 * \col_offset is the number of characters before the first character | 2715 * \param col_offset is the number of characters before the first character |
2696 * in the first line of the Dart script. | 2716 * in the first line of the Dart script. |
2697 */ | 2717 */ |
2698 DART_EXPORT Dart_Handle Dart_LoadScript(Dart_Handle url, | 2718 DART_EXPORT Dart_Handle Dart_LoadScript(Dart_Handle url, |
2699 Dart_Handle source, | 2719 Dart_Handle source, |
2700 intptr_t line_offset, | 2720 intptr_t line_offset, |
2701 intptr_t col_offset); | 2721 intptr_t col_offset); |
2702 | 2722 |
2703 /** | 2723 /** |
2704 * Loads the root script for current isolate from a snapshot. | 2724 * Loads the root script for current isolate from a snapshot. |
2705 * | 2725 * |
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3051 /** | 3071 /** |
3052 * Returns whether the VM was initialized with a precompiled snapshot. Only | 3072 * Returns whether the VM was initialized with a precompiled snapshot. Only |
3053 * valid after Dart_Initialize. | 3073 * valid after Dart_Initialize. |
3054 * DEPRECATED. This is currently used to disable Platform.executable and | 3074 * DEPRECATED. This is currently used to disable Platform.executable and |
3055 * Platform.resolvedExecutable under precompilation to prevent process | 3075 * Platform.resolvedExecutable under precompilation to prevent process |
3056 * spawning tests from becoming fork-bombs. | 3076 * spawning tests from becoming fork-bombs. |
3057 */ | 3077 */ |
3058 DART_EXPORT bool Dart_IsRunningPrecompiledCode(); | 3078 DART_EXPORT bool Dart_IsRunningPrecompiledCode(); |
3059 | 3079 |
3060 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ | 3080 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ |
OLD | NEW |