Chromium Code Reviews| 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 1465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1476 * \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. |
| 1477 * 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. |
| 1478 * | 1478 * |
| 1479 * \return A valid handle if no error occurs during the operation. | 1479 * \return A valid handle if no error occurs during the operation. |
| 1480 */ | 1480 */ |
| 1481 DART_EXPORT Dart_Handle Dart_StringToUTF16(Dart_Handle str, | 1481 DART_EXPORT Dart_Handle Dart_StringToUTF16(Dart_Handle str, |
| 1482 uint16_t* utf16_array, | 1482 uint16_t* utf16_array, |
| 1483 intptr_t* length); | 1483 intptr_t* length); |
| 1484 | 1484 |
| 1485 | 1485 |
| 1486 /** | |
| 1487 * Converts a String into an ExternalString. | |
|
Anton Muhin
2012/11/07 10:05:46
From the documentation and a signature it's not ob
siva
2012/11/07 21:43:27
I am assuming converts means it morphs the existin
Anton Muhin
2012/11/08 08:05:29
Up to you, Siva.
Ivan Posva
2012/11/08 08:50:47
Anton, the reason I think this "optimization" paid
Anton Muhin
2012/11/08 08:56:08
I am not quite sure---if memory serves V8 was alwa
| |
| 1488 * | |
| 1489 * \param array External space into which the string data will be | |
| 1490 * copied into. This must not move. | |
| 1491 * \param length The length of the provided space. | |
| 1492 * \param peer An external pointer to associate with this string. | |
| 1493 * \param cback A callback to be called when this string is finalized. | |
| 1494 * | |
| 1495 * \return the converted ExternalString object if no error occurs. | |
| 1496 * Otherwise returns an error handle. | |
| 1497 */ | |
| 1498 DART_EXPORT Dart_Handle Dart_MakeExternalString(Dart_Handle str, | |
| 1499 void* array, | |
| 1500 intptr_t length, | |
|
Anton Muhin
2012/11/07 10:05:46
how embedder can find out this length?
siva
2012/11/07 21:43:27
This is the length of array passed in by the embed
Anton Muhin
2012/11/08 08:05:29
I might be missing something, sorry if it's the ca
siva
2012/11/09 02:55:06
Added an API function to determine the storage siz
| |
| 1501 void* peer, | |
| 1502 Dart_PeerFinalizer cback); | |
| 1503 | |
| 1504 | |
| 1486 // --- Lists --- | 1505 // --- Lists --- |
| 1487 | 1506 |
| 1488 /** | 1507 /** |
| 1489 * Is this object a List? | 1508 * Is this object a List? |
| 1490 */ | 1509 */ |
| 1491 DART_EXPORT bool Dart_IsList(Dart_Handle object); | 1510 DART_EXPORT bool Dart_IsList(Dart_Handle object); |
| 1492 | 1511 |
| 1493 /** | 1512 /** |
| 1494 * Returns a List of the desired length. | 1513 * Returns a List of the desired length. |
| 1495 * | 1514 * |
| (...skipping 1234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2730 * | 2749 * |
| 2731 * \param object An object. | 2750 * \param object An object. |
| 2732 * \param peer A value to store in the peer field. | 2751 * \param peer A value to store in the peer field. |
| 2733 * | 2752 * |
| 2734 * \return Returns an error if 'object' is a subtype of Null, num, or | 2753 * \return Returns an error if 'object' is a subtype of Null, num, or |
| 2735 * bool. | 2754 * bool. |
| 2736 */ | 2755 */ |
| 2737 DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer); | 2756 DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer); |
| 2738 | 2757 |
| 2739 #endif // INCLUDE_DART_API_H_ | 2758 #endif // INCLUDE_DART_API_H_ |
| OLD | NEW |