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 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
936 // --- Message sending/receiving from native code ---- | 936 // --- Message sending/receiving from native code ---- |
937 | 937 |
938 /** | 938 /** |
939 * A Dart_CObject is used for representing Dart objects as native C | 939 * A Dart_CObject is used for representing Dart objects as native C |
940 * data outside the Dart heap. These objects are totally detached from | 940 * data outside the Dart heap. These objects are totally detached from |
941 * the Dart heap. Only a subset of the Dart objects have a | 941 * the Dart heap. Only a subset of the Dart objects have a |
942 * representation as a Dart_CObject. | 942 * representation as a Dart_CObject. |
943 * | 943 * |
944 * The string encoding in the 'value.as_string' is UTF-8. | 944 * The string encoding in the 'value.as_string' is UTF-8. |
945 * | 945 * |
946 * All the different types from dart:typeddata are exposed as type | 946 * All the different types from dart:typed_data are exposed as type |
947 * kTypedData. The specific type from dart:typeddata is in the type | 947 * kTypedData. The specific type from dart:typed_data is in the type |
948 * field of the as_typed_data structure. The length in the | 948 * field of the as_typed_data structure. The length in the |
949 * as_typed_data structure is always in bytes. | 949 * as_typed_data structure is always in bytes. |
950 */ | 950 */ |
951 typedef struct _Dart_CObject { | 951 typedef struct _Dart_CObject { |
952 enum Type { | 952 enum Type { |
953 kNull = 0, | 953 kNull = 0, |
954 kBool, | 954 kBool, |
955 kInt32, | 955 kInt32, |
956 kInt64, | 956 kInt64, |
957 kBigint, | 957 kBigint, |
(...skipping 1645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2603 * | 2603 * |
2604 * \param object An object. | 2604 * \param object An object. |
2605 * \param peer A value to store in the peer field. | 2605 * \param peer A value to store in the peer field. |
2606 * | 2606 * |
2607 * \return Returns an error if 'object' is a subtype of Null, num, or | 2607 * \return Returns an error if 'object' is a subtype of Null, num, or |
2608 * bool. | 2608 * bool. |
2609 */ | 2609 */ |
2610 DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer); | 2610 DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer); |
2611 | 2611 |
2612 #endif // INCLUDE_DART_API_H_ | 2612 #endif // INCLUDE_DART_API_H_ |
OLD | NEW |