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. | |
1677 * A clamped ByteArray differs from ByteArray above in the indexed store | |
1678 * operation where negative values are clamped to 0 and values above 255 are | |
1679 * clamped to 255. | |
1680 * | |
1681 * \param value An array of 8-bit bytes. This array must not move. | |
1682 * \param length The length of the array. | |
1683 * \param peer An external pointer to associate with this byte array. | |
1684 * | |
1685 * \return The clamped ByteArray object if no error occurs. Otherwise returns | |
1686 * an error handle. | |
1687 */ | |
1688 DART_EXPORT Dart_Handle Dart_NewExternalClampedByteArray( | |
Anton Muhin
2013/01/15 10:11:43
It may be only me, but when I first time met the n
| |
1689 uint8_t* data, | |
1690 intptr_t length, | |
1691 void* peer, | |
1692 Dart_PeerFinalizer callback); | |
1693 | |
1694 /** | |
1675 * Retrieves the data pointer associated with an external ByteArray. | 1695 * Retrieves the data pointer associated with an external ByteArray. |
1676 */ | 1696 */ |
1677 DART_EXPORT Dart_Handle Dart_ExternalByteArrayGetData(Dart_Handle object, | 1697 DART_EXPORT Dart_Handle Dart_ExternalByteArrayGetData(Dart_Handle object, |
1678 void** data); | 1698 void** data); |
1679 | 1699 |
1680 /** | 1700 /** |
1681 * Retrieves the peer pointer associated with an external ByteArray. | 1701 * Retrieves the peer pointer associated with an external ByteArray. |
1682 */ | 1702 */ |
1683 DART_EXPORT Dart_Handle Dart_ExternalByteArrayGetPeer(Dart_Handle object, | 1703 DART_EXPORT Dart_Handle Dart_ExternalByteArrayGetPeer(Dart_Handle object, |
1684 void** peer); | 1704 void** peer); |
(...skipping 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2807 * | 2827 * |
2808 * \param object An object. | 2828 * \param object An object. |
2809 * \param peer A value to store in the peer field. | 2829 * \param peer A value to store in the peer field. |
2810 * | 2830 * |
2811 * \return Returns an error if 'object' is a subtype of Null, num, or | 2831 * \return Returns an error if 'object' is a subtype of Null, num, or |
2812 * bool. | 2832 * bool. |
2813 */ | 2833 */ |
2814 DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer); | 2834 DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer); |
2815 | 2835 |
2816 #endif // INCLUDE_DART_API_H_ | 2836 #endif // INCLUDE_DART_API_H_ |
OLD | NEW |