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 1342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1353 // TODO(turnidge): Rename to Dart_LibrarySetNativeResolver? | 1353 // TODO(turnidge): Rename to Dart_LibrarySetNativeResolver? |
1354 | 1354 |
1355 // --- Profiling support ---- | 1355 // --- Profiling support ---- |
1356 | 1356 |
1357 // External pprof support for gathering and dumping symbolic | 1357 // External pprof support for gathering and dumping symbolic |
1358 // information that can be used for better profile reports for | 1358 // information that can be used for better profile reports for |
1359 // dynamically generated code. | 1359 // dynamically generated code. |
1360 DART_EXPORT void Dart_InitPprofSupport(); | 1360 DART_EXPORT void Dart_InitPprofSupport(); |
1361 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size); | 1361 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size); |
1362 | 1362 |
1363 // --- Message encoding/decoding ---- | 1363 // --- Message sending/receiving from native code ---- |
1364 | 1364 |
1365 /** | 1365 /** |
1366 * A Dart_CObject is used for representing Dart objects as native C | 1366 * A Dart_CObject is used for representing Dart objects as native C |
1367 * data outside the Dart heap. These objects are totally detached from | 1367 * data outside the Dart heap. These objects are totally detached from |
1368 * the Dart heap. Only a subset of the Dart objects have a | 1368 * the Dart heap. Only a subset of the Dart objects have a |
1369 * representation as a Dart_CObject. | 1369 * representation as a Dart_CObject. |
1370 */ | 1370 */ |
1371 struct Dart_CObject { | 1371 struct Dart_CObject { |
1372 enum Type { | 1372 enum Type { |
1373 kNull = 0, | 1373 kNull = 0, |
(...skipping 11 matching lines...) Expand all Loading... |
1385 double as_double; | 1385 double as_double; |
1386 char* as_string; | 1386 char* as_string; |
1387 struct { | 1387 struct { |
1388 int length; | 1388 int length; |
1389 Dart_CObject** values; | 1389 Dart_CObject** values; |
1390 } as_array; | 1390 } as_array; |
1391 } value; | 1391 } value; |
1392 }; | 1392 }; |
1393 | 1393 |
1394 /** | 1394 /** |
1395 * A Dart_CMessage is used for encoding and decoding messages from native code. | 1395 * A Dart_CMessage is used for receiving and sending messages from |
| 1396 * native code not running in an isolate. A message contains an object |
| 1397 * graph represented as Dart_CObject structures rooted as the provided |
| 1398 * root. |
| 1399 * |
| 1400 * For information on the lifetime of this data, when provided in |
| 1401 * callbacks, see the documentation for the individual callbacks. |
1396 */ | 1402 */ |
1397 struct Dart_CMessage { | 1403 struct Dart_CMessage { |
1398 Dart_CObject** message; | 1404 Dart_CObject* root; |
1399 }; | 1405 }; |
1400 | 1406 |
| 1407 |
1401 #endif // INCLUDE_DART_API_H_ | 1408 #endif // INCLUDE_DART_API_H_ |
OLD | NEW |