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 1458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1469 * | 1469 * |
1470 * \return A valid handle if no error occurs during the operation. | 1470 * \return A valid handle if no error occurs during the operation. |
1471 */ | 1471 */ |
1472 DART_EXPORT Dart_Handle Dart_StringToUTF8(Dart_Handle str, | 1472 DART_EXPORT Dart_Handle Dart_StringToUTF8(Dart_Handle str, |
1473 uint8_t** utf8_array, | 1473 uint8_t** utf8_array, |
1474 intptr_t* length); | 1474 intptr_t* length); |
1475 | 1475 |
1476 /** | 1476 /** |
1477 * Gets the data corresponding to the string object. This function returns | 1477 * Gets the data corresponding to the string object. This function returns |
1478 * the data only for Latin-1 (ISO-8859-1) string objects. For all other | 1478 * the data only for Latin-1 (ISO-8859-1) string objects. For all other |
1479 * string objects it return and error. | 1479 * string objects it returns an error. |
1480 * | 1480 * |
1481 * \param str A string. | 1481 * \param str A string. |
1482 * \param latin1_array An array allocated by the caller, used to return | 1482 * \param latin1_array An array allocated by the caller, used to return |
1483 * the string data. | 1483 * the string data. |
1484 * \param length Used to pass in the length of the provided array. | 1484 * \param length Used to pass in the length of the provided array. |
1485 * Used to return the length of the array which was actually used. | 1485 * Used to return the length of the array which was actually used. |
1486 * | 1486 * |
1487 * \return A valid handle if no error occurs during the operation. | 1487 * \return A valid handle if no error occurs during the operation. |
1488 */ | 1488 */ |
1489 DART_EXPORT Dart_Handle Dart_StringToLatin1(Dart_Handle str, | 1489 DART_EXPORT Dart_Handle Dart_StringToLatin1(Dart_Handle str, |
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2113 * | 2113 * |
2114 * \return A valid handle if the native resolver was set successfully. | 2114 * \return A valid handle if the native resolver was set successfully. |
2115 */ | 2115 */ |
2116 DART_EXPORT Dart_Handle Dart_SetNativeResolver( | 2116 DART_EXPORT Dart_Handle Dart_SetNativeResolver( |
2117 Dart_Handle library, | 2117 Dart_Handle library, |
2118 Dart_NativeEntryResolver resolver); | 2118 Dart_NativeEntryResolver resolver); |
2119 /* TODO(turnidge): Rename to Dart_LibrarySetNativeResolver? */ | 2119 /* TODO(turnidge): Rename to Dart_LibrarySetNativeResolver? */ |
2120 | 2120 |
2121 | 2121 |
2122 /* | 2122 /* |
| 2123 * =========== |
| 2124 * Environment |
| 2125 * =========== |
| 2126 */ |
| 2127 |
| 2128 typedef enum { |
| 2129 kStringEnvironment = 0, |
| 2130 kIntegerEnvironment, |
| 2131 kBoolEnvironment |
| 2132 } Dart_EnvironmentType; |
| 2133 |
| 2134 /* TODO(iposva): Document. */ |
| 2135 typedef Dart_Handle (*Dart_EnvironmentCallback)(Dart_EnvironmentType type, |
| 2136 Dart_Handle name); |
| 2137 |
| 2138 /** |
| 2139 * Sets the configuration callback for the current isolate. This callback is |
| 2140 * used to lookup configuration values by name in the current environment. |
| 2141 */ |
| 2142 DART_EXPORT Dart_Handle Dart_SetEnvironmentCallback( |
| 2143 Dart_EnvironmentCallback callback); |
| 2144 |
| 2145 /* |
2123 * ===================== | 2146 * ===================== |
2124 * Scripts and Libraries | 2147 * Scripts and Libraries |
2125 * ===================== | 2148 * ===================== |
2126 */ | 2149 */ |
2127 /* TODO(turnidge): Finish documenting this section. */ | 2150 /* TODO(turnidge): Finish documenting this section. */ |
2128 | 2151 |
2129 typedef enum { | 2152 typedef enum { |
2130 Dart_kLibraryTag = 0, | 2153 Dart_kLibraryTag = 0, |
2131 Dart_kImportTag, | 2154 Dart_kImportTag, |
2132 Dart_kSourceTag, | 2155 Dart_kSourceTag, |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2311 * | 2334 * |
2312 * \param object An object. | 2335 * \param object An object. |
2313 * \param peer A value to store in the peer field. | 2336 * \param peer A value to store in the peer field. |
2314 * | 2337 * |
2315 * \return Returns an error if 'object' is a subtype of Null, num, or | 2338 * \return Returns an error if 'object' is a subtype of Null, num, or |
2316 * bool. | 2339 * bool. |
2317 */ | 2340 */ |
2318 DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer); | 2341 DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer); |
2319 | 2342 |
2320 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ | 2343 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ |
OLD | NEW |