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 1654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1665 * | 1665 * |
1666 * \return The ByteArray object if no error occurs. Otherwise returns | 1666 * \return The ByteArray object if no error occurs. Otherwise returns |
1667 * an error handle. | 1667 * an error handle. |
1668 */ | 1668 */ |
1669 DART_EXPORT Dart_Handle Dart_NewExternalByteArray(uint8_t* data, | 1669 DART_EXPORT Dart_Handle Dart_NewExternalByteArray(uint8_t* data, |
1670 intptr_t length, | 1670 intptr_t length, |
1671 void* peer, | 1671 void* peer, |
1672 Dart_PeerFinalizer callback); | 1672 Dart_PeerFinalizer callback); |
1673 | 1673 |
1674 /** | 1674 /** |
1675 * Returns a clamped ByteArray which references an external array of | |
1676 * 8-bit bytes. | |
siva
2013/01/15 00:54:23
Maybe we should also add a line here which explain
srdjan
2013/01/15 01:11:10
Done.
| |
1677 * | |
1678 * \param value An array of 8-bit bytes. This array must not move. | |
1679 * \param length The length of the array. | |
1680 * \param peer An external pointer to associate with this byte array. | |
1681 * | |
1682 * \return The ByteArray object if no error occurs. Otherwise returns | |
siva
2013/01/15 00:54:23
The clamped ByteArray object if
srdjan
2013/01/15 01:11:10
Done.
| |
1683 * an error handle. | |
1684 */ | |
1685 DART_EXPORT Dart_Handle Dart_NewExternalClampedByteArray( | |
1686 uint8_t* data, | |
1687 intptr_t length, | |
1688 void* peer, | |
1689 Dart_PeerFinalizer callback); | |
1690 | |
1691 /** | |
1675 * Retrieves the data pointer associated with an external ByteArray. | 1692 * Retrieves the data pointer associated with an external ByteArray. |
1676 */ | 1693 */ |
1677 DART_EXPORT Dart_Handle Dart_ExternalByteArrayGetData(Dart_Handle object, | 1694 DART_EXPORT Dart_Handle Dart_ExternalByteArrayGetData(Dart_Handle object, |
1678 void** data); | 1695 void** data); |
1679 | 1696 |
1680 /** | 1697 /** |
1681 * Retrieves the peer pointer associated with an external ByteArray. | 1698 * Retrieves the peer pointer associated with an external ByteArray. |
1682 */ | 1699 */ |
1683 DART_EXPORT Dart_Handle Dart_ExternalByteArrayGetPeer(Dart_Handle object, | 1700 DART_EXPORT Dart_Handle Dart_ExternalByteArrayGetPeer(Dart_Handle object, |
1684 void** peer); | 1701 void** peer); |
(...skipping 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2807 * | 2824 * |
2808 * \param object An object. | 2825 * \param object An object. |
2809 * \param peer A value to store in the peer field. | 2826 * \param peer A value to store in the peer field. |
2810 * | 2827 * |
2811 * \return Returns an error if 'object' is a subtype of Null, num, or | 2828 * \return Returns an error if 'object' is a subtype of Null, num, or |
2812 * bool. | 2829 * bool. |
2813 */ | 2830 */ |
2814 DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer); | 2831 DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer); |
2815 | 2832 |
2816 #endif // INCLUDE_DART_API_H_ | 2833 #endif // INCLUDE_DART_API_H_ |
OLD | NEW |