| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef INCLUDE_DART_API_H_ | 5 #ifndef INCLUDE_DART_API_H_ |
| 6 #define INCLUDE_DART_API_H_ | 6 #define INCLUDE_DART_API_H_ |
| 7 | 7 |
| 8 /** \mainpage Dart Embedding API Reference | 8 /** \mainpage Dart Embedding API Reference |
| 9 * | 9 * |
| 10 * Dart is a class-based programming language for creating structured | 10 * Dart is a class-based programming language for creating structured |
| (...skipping 1437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1448 * | 1448 * |
| 1449 * \return A valid handle if no error occurs during the operation. | 1449 * \return A valid handle if no error occurs during the operation. |
| 1450 */ | 1450 */ |
| 1451 DART_EXPORT Dart_Handle Dart_StringToCString(Dart_Handle str, | 1451 DART_EXPORT Dart_Handle Dart_StringToCString(Dart_Handle str, |
| 1452 const char** cstr); | 1452 const char** cstr); |
| 1453 | 1453 |
| 1454 /** | 1454 /** |
| 1455 * Gets a UTF-8 encoded representation of a String. | 1455 * Gets a UTF-8 encoded representation of a String. |
| 1456 * | 1456 * |
| 1457 * \param str A string. | 1457 * \param str A string. |
| 1458 * \param utf8_array An array allocated by the caller, used to return | 1458 * \param utf8_array Returns the String represented as UTF-8 code |
| 1459 * the array of UTF-8 encoded characters. | 1459 * units. This UTF-8 array is scope allocated and is only valid |
| 1460 * \param length Used to pass in the length of the provided array. | 1460 * until the next call to Dart_ExitScope. |
| 1461 * Used to return the length of the array which was actually used. | 1461 * \param length Used to return the length of the array which was |
| 1462 * actually used. |
| 1462 * | 1463 * |
| 1463 * \return A valid handle if no error occurs during the operation. | 1464 * \return A valid handle if no error occurs during the operation. |
| 1464 */ | 1465 */ |
| 1465 DART_EXPORT Dart_Handle Dart_StringToUTF8(Dart_Handle str, | 1466 DART_EXPORT Dart_Handle Dart_StringToUTF8(Dart_Handle str, |
| 1466 uint8_t* utf8_array, | 1467 uint8_t** utf8_array, |
| 1467 intptr_t* length); | 1468 intptr_t* length); |
| 1468 | 1469 |
| 1469 /** | 1470 /** |
| 1470 * Gets the UTF-16 encoded representation of a string. | 1471 * Gets the UTF-16 encoded representation of a string. |
| 1471 * | 1472 * |
| 1472 * \param str A string. | 1473 * \param str A string. |
| 1473 * \param utf16_array An array allocated by the caller, used to return | 1474 * \param utf16_array An array allocated by the caller, used to return |
| 1474 * the array of UTF-16 encoded characters. | 1475 * the array of UTF-16 encoded characters. |
| 1475 * \param length Used to pass in the length of the provided array. | 1476 * \param length Used to pass in the length of the provided array. |
| 1476 * Used to return the length of the array which was actually used. | 1477 * Used to return the length of the array which was actually used. |
| (...skipping 1252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2729 * | 2730 * |
| 2730 * \param object An object. | 2731 * \param object An object. |
| 2731 * \param peer A value to store in the peer field. | 2732 * \param peer A value to store in the peer field. |
| 2732 * | 2733 * |
| 2733 * \return Returns an error if 'object' is a subtype of Null, num, or | 2734 * \return Returns an error if 'object' is a subtype of Null, num, or |
| 2734 * bool. | 2735 * bool. |
| 2735 */ | 2736 */ |
| 2736 DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer); | 2737 DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer); |
| 2737 | 2738 |
| 2738 #endif // INCLUDE_DART_API_H_ | 2739 #endif // INCLUDE_DART_API_H_ |
| OLD | NEW |