| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 2 * Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 3 * for details. All rights reserved. Use of this source code is governed by a | 3 * for details. All rights reserved. Use of this source code is governed by a |
| 4 * BSD-style license that can be found in the LICENSE file. | 4 * BSD-style license that can be found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 #ifndef INCLUDE_DART_NATIVE_API_H_ | 7 #ifndef INCLUDE_DART_NATIVE_API_H_ |
| 8 #define INCLUDE_DART_NATIVE_API_H_ | 8 #define INCLUDE_DART_NATIVE_API_H_ |
| 9 | 9 |
| 10 #include "include/dart_api.h" | 10 #include "include/dart_api.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 * restored. | 95 * restored. |
| 96 * | 96 * |
| 97 * \param port_id The destination port. | 97 * \param port_id The destination port. |
| 98 * \param message The message to send. | 98 * \param message The message to send. |
| 99 * | 99 * |
| 100 * \return True if the message was posted. | 100 * \return True if the message was posted. |
| 101 */ | 101 */ |
| 102 DART_EXPORT bool Dart_PostCObject(Dart_Port port_id, Dart_CObject* message); | 102 DART_EXPORT bool Dart_PostCObject(Dart_Port port_id, Dart_CObject* message); |
| 103 | 103 |
| 104 /** | 104 /** |
| 105 * Posts a message on some port. The message will contain the integer 'message'. |
| 106 * |
| 107 * \param port_id The destination port. |
| 108 * \param message The message to send. |
| 109 * |
| 110 * \return True if the message was posted. |
| 111 */ |
| 112 DART_EXPORT bool Dart_PostInteger(Dart_Port port_id, intptr_t message); |
| 113 |
| 114 /** |
| 105 * A native message handler. | 115 * A native message handler. |
| 106 * | 116 * |
| 107 * This handler is associated with a native port by calling | 117 * This handler is associated with a native port by calling |
| 108 * Dart_NewNativePort. | 118 * Dart_NewNativePort. |
| 109 * | 119 * |
| 110 * The message received is decoded into the message structure. The | 120 * The message received is decoded into the message structure. The |
| 111 * lifetime of the message data is controlled by the caller. All the | 121 * lifetime of the message data is controlled by the caller. All the |
| 112 * data references from the message are allocated by the caller and | 122 * data references from the message are allocated by the caller and |
| 113 * will be reclaimed when returning to it. | 123 * will be reclaimed when returning to it. |
| 114 */ | 124 */ |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 | 164 |
| 155 /** | 165 /** |
| 156 * Forces all loaded classes and functions to be compiled eagerly in | 166 * Forces all loaded classes and functions to be compiled eagerly in |
| 157 * the current isolate.. | 167 * the current isolate.. |
| 158 * | 168 * |
| 159 * TODO(turnidge): Document. | 169 * TODO(turnidge): Document. |
| 160 */ | 170 */ |
| 161 DART_EXPORT Dart_Handle Dart_CompileAll(); | 171 DART_EXPORT Dart_Handle Dart_CompileAll(); |
| 162 | 172 |
| 163 #endif /* INCLUDE_DART_NATIVE_API_H_ */ /* NOLINT */ | 173 #endif /* INCLUDE_DART_NATIVE_API_H_ */ /* NOLINT */ |
| OLD | NEW |