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 2622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2633 * | 2633 * |
2634 * \return If the VM handles the error, the return value is | 2634 * \return If the VM handles the error, the return value is |
2635 * a null handle. If it doesn't handle the error, the error | 2635 * a null handle. If it doesn't handle the error, the error |
2636 * object is returned. | 2636 * object is returned. |
2637 */ | 2637 */ |
2638 DART_EXPORT Dart_Handle Dart_LibraryHandleError(Dart_Handle library, | 2638 DART_EXPORT Dart_Handle Dart_LibraryHandleError(Dart_Handle library, |
2639 Dart_Handle error); | 2639 Dart_Handle error); |
2640 | 2640 |
2641 | 2641 |
2642 DART_EXPORT Dart_Handle Dart_LoadLibrary(Dart_Handle url, | 2642 DART_EXPORT Dart_Handle Dart_LoadLibrary(Dart_Handle url, |
2643 Dart_Handle source); | 2643 Dart_Handle source, |
| 2644 intptr_t line_offset, |
| 2645 intptr_t column_offset); |
2644 | 2646 |
2645 /** | 2647 /** |
2646 * Imports a library into another library, optionally with a prefix. | 2648 * Imports a library into another library, optionally with a prefix. |
2647 * If no prefix is required, an empty string or Dart_Null() can be | 2649 * If no prefix is required, an empty string or Dart_Null() can be |
2648 * supplied. | 2650 * supplied. |
2649 * | 2651 * |
2650 * \param library The library into which to import another library. | 2652 * \param library The library into which to import another library. |
2651 * \param import The library to import. | 2653 * \param import The library to import. |
2652 * \param prefix The prefix under which to import. | 2654 * \param prefix The prefix under which to import. |
2653 * | 2655 * |
2654 * \return A valid handle if no error occurs during the operation. | 2656 * \return A valid handle if no error occurs during the operation. |
2655 */ | 2657 */ |
2656 DART_EXPORT Dart_Handle Dart_LibraryImportLibrary(Dart_Handle library, | 2658 DART_EXPORT Dart_Handle Dart_LibraryImportLibrary(Dart_Handle library, |
2657 Dart_Handle import, | 2659 Dart_Handle import, |
2658 Dart_Handle prefix); | 2660 Dart_Handle prefix); |
2659 | 2661 |
2660 /** | 2662 /** |
2661 * Loads a source string into a library. | 2663 * Loads a source string into a library. |
2662 * | 2664 * |
2663 * \param library A library | 2665 * \param library A library |
2664 * \param url A url identifying the origin of the source | 2666 * \param url A url identifying the origin of the source |
2665 * \param source A string of Dart source | 2667 * \param source A string of Dart source |
2666 * | 2668 * |
2667 * \return A valid handle if no error occurs during the operation. | 2669 * \return A valid handle if no error occurs during the operation. |
2668 */ | 2670 */ |
2669 DART_EXPORT Dart_Handle Dart_LoadSource(Dart_Handle library, | 2671 DART_EXPORT Dart_Handle Dart_LoadSource(Dart_Handle library, |
2670 Dart_Handle url, | 2672 Dart_Handle url, |
2671 Dart_Handle source); | 2673 Dart_Handle source, |
| 2674 intptr_t line_offset, |
| 2675 intptr_t column_offset); |
2672 /* TODO(turnidge): Rename to Dart_LibraryLoadSource? */ | 2676 /* TODO(turnidge): Rename to Dart_LibraryLoadSource? */ |
2673 | 2677 |
2674 | 2678 |
2675 /** | 2679 /** |
2676 * Loads a patch source string into a library. | 2680 * Loads a patch source string into a library. |
2677 * | 2681 * |
2678 * \param library A library | 2682 * \param library A library |
2679 * \param url A url identifying the origin of the patch source | 2683 * \param url A url identifying the origin of the patch source |
2680 * \param source A string of Dart patch source | 2684 * \param source A string of Dart patch source |
2681 */ | 2685 */ |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2829 * NOTE: If multiple callbacks with the same name are registered, only the | 2833 * NOTE: If multiple callbacks with the same name are registered, only the |
2830 * last callback registered will be remembered. | 2834 * last callback registered will be remembered. |
2831 */ | 2835 */ |
2832 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( | 2836 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( |
2833 const char* name, | 2837 const char* name, |
2834 Dart_ServiceRequestCallback callback, | 2838 Dart_ServiceRequestCallback callback, |
2835 void* user_data); | 2839 void* user_data); |
2836 | 2840 |
2837 | 2841 |
2838 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ | 2842 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ |
OLD | NEW |