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 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
713 * Dart_LoadScript or Dart_LoadScriptFromSnapshot. | 713 * Dart_LoadScript or Dart_LoadScriptFromSnapshot. |
714 * This uri will be NULL if the isolate is being created using the | 714 * This uri will be NULL if the isolate is being created using the |
715 * spawnFunction isolate API. | 715 * spawnFunction isolate API. |
716 * The callback is responsible for loading the script used in the | 716 * The callback is responsible for loading the script used in the |
717 * parent isolate by a call to Dart_LoadScript or | 717 * parent isolate by a call to Dart_LoadScript or |
718 * Dart_LoadScriptFromSnapshot. | 718 * Dart_LoadScriptFromSnapshot. |
719 * \param main The name of the main entry point this isolate will | 719 * \param main The name of the main entry point this isolate will |
720 * eventually run. This is provided for advisory purposes only to | 720 * eventually run. This is provided for advisory purposes only to |
721 * improve debugging messages. The main function is not invoked by | 721 * improve debugging messages. The main function is not invoked by |
722 * this function. | 722 * this function. |
| 723 * \param package_root The package root path for this isolate to resolve |
| 724 * package imports against. If this parameter is NULL, the package root path |
| 725 * of the parent isolate should be used. |
723 * \param callback_data The callback data which was passed to the | 726 * \param callback_data The callback data which was passed to the |
724 * parent isolate when it was created by calling Dart_CreateIsolate(). | 727 * parent isolate when it was created by calling Dart_CreateIsolate(). |
725 * \param error A structure into which the embedder can place a | 728 * \param error A structure into which the embedder can place a |
726 * C string containing an error message in the case of failures. | 729 * C string containing an error message in the case of failures. |
727 * | 730 * |
728 * \return The embedder returns NULL if the creation and | 731 * \return The embedder returns NULL if the creation and |
729 * initialization was not successful and the isolate if successful. | 732 * initialization was not successful and the isolate if successful. |
730 */ | 733 */ |
731 typedef Dart_Isolate (*Dart_IsolateCreateCallback)(const char* script_uri, | 734 typedef Dart_Isolate (*Dart_IsolateCreateCallback)(const char* script_uri, |
732 const char* main, | 735 const char* main, |
| 736 const char* package_root, |
733 void* callback_data, | 737 void* callback_data, |
734 char** error); | 738 char** error); |
735 | 739 |
736 | 740 |
737 /** | 741 /** |
738 * The service isolate creation and initialization callback function. | 742 * The service isolate creation and initialization callback function. |
739 * | 743 * |
740 * This callback, provided by the embedder, is called when the vm | 744 * This callback, provided by the embedder, is called when the vm |
741 * needs to create the service isolate. The callback should create an isolate | 745 * needs to create the service isolate. The callback should create an isolate |
742 * by calling Dart_CreateIsolate and prepare the isolate to be used as | 746 * by calling Dart_CreateIsolate and prepare the isolate to be used as |
(...skipping 2091 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2834 * NOTE: If multiple callbacks with the same name are registered, only the | 2838 * NOTE: If multiple callbacks with the same name are registered, only the |
2835 * last callback registered will be remembered. | 2839 * last callback registered will be remembered. |
2836 */ | 2840 */ |
2837 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( | 2841 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( |
2838 const char* name, | 2842 const char* name, |
2839 Dart_ServiceRequestCallback callback, | 2843 Dart_ServiceRequestCallback callback, |
2840 void* user_data); | 2844 void* user_data); |
2841 | 2845 |
2842 | 2846 |
2843 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ | 2847 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ |
OLD | NEW |