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 895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
906 */ | 906 */ |
907 DART_EXPORT bool Dart_Post(Dart_Port port_id, Dart_Handle object); | 907 DART_EXPORT bool Dart_Post(Dart_Port port_id, Dart_Handle object); |
908 | 908 |
909 // --- Message sending/receiving from native code ---- | 909 // --- Message sending/receiving from native code ---- |
910 | 910 |
911 /** | 911 /** |
912 * A Dart_CObject is used for representing Dart objects as native C | 912 * A Dart_CObject is used for representing Dart objects as native C |
913 * data outside the Dart heap. These objects are totally detached from | 913 * data outside the Dart heap. These objects are totally detached from |
914 * the Dart heap. Only a subset of the Dart objects have a | 914 * the Dart heap. Only a subset of the Dart objects have a |
915 * representation as a Dart_CObject. | 915 * representation as a Dart_CObject. |
| 916 * |
| 917 * The string encoding in the 'value.as_string' is UTF-8. |
916 */ | 918 */ |
917 typedef struct _Dart_CObject { | 919 typedef struct _Dart_CObject { |
918 enum Type { | 920 enum Type { |
919 kNull = 0, | 921 kNull = 0, |
920 kBool, | 922 kBool, |
921 kInt32, | 923 kInt32, |
922 kInt64, | 924 kInt64, |
923 kBigint, | 925 kBigint, |
924 kDouble, | 926 kDouble, |
925 kString, | 927 kString, |
(...skipping 1804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2730 * | 2732 * |
2731 * \param object An object. | 2733 * \param object An object. |
2732 * \param peer A value to store in the peer field. | 2734 * \param peer A value to store in the peer field. |
2733 * | 2735 * |
2734 * \return Returns an error if 'object' is a subtype of Null, num, or | 2736 * \return Returns an error if 'object' is a subtype of Null, num, or |
2735 * bool. | 2737 * bool. |
2736 */ | 2738 */ |
2737 DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer); | 2739 DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer); |
2738 | 2740 |
2739 #endif // INCLUDE_DART_API_H_ | 2741 #endif // INCLUDE_DART_API_H_ |
OLD | NEW |