OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 2 * Copyright (c) 2012, 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_API_H_ | 7 #ifndef INCLUDE_DART_API_H_ |
8 #define INCLUDE_DART_API_H_ | 8 #define INCLUDE_DART_API_H_ |
9 | 9 |
10 /** \mainpage Dart Embedding API Reference | 10 /** \mainpage Dart Embedding API Reference |
(...skipping 1811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1822 * | 1822 * |
1823 * \return If no error occurs during execution, then the result of | 1823 * \return If no error occurs during execution, then the result of |
1824 * invoking the closure is returned. If an error occurs during | 1824 * invoking the closure is returned. If an error occurs during |
1825 * execution, then an error handle is returned. | 1825 * execution, then an error handle is returned. |
1826 */ | 1826 */ |
1827 DART_EXPORT Dart_Handle Dart_InvokeClosure(Dart_Handle closure, | 1827 DART_EXPORT Dart_Handle Dart_InvokeClosure(Dart_Handle closure, |
1828 int number_of_arguments, | 1828 int number_of_arguments, |
1829 Dart_Handle* arguments); | 1829 Dart_Handle* arguments); |
1830 | 1830 |
1831 /** | 1831 /** |
| 1832 * Invokes a Generative Constructor on an object that was previously |
| 1833 * allocated using Dart_Allocate. |
| 1834 * |
| 1835 * The 'target' parameter must be an object. |
| 1836 * |
| 1837 * This function ignores visibility (leading underscores in names). |
| 1838 * |
| 1839 * May generate an unhandled exception error. |
| 1840 * |
| 1841 * \param target An object. |
| 1842 * \param name The name of the constructor to invoke. |
| 1843 * \param number_of_arguments Size of the arguments array. |
| 1844 * \param arguments An array of arguments to the function. |
| 1845 * |
| 1846 * \return If the constructor is called and completes |
| 1847 * successfully, then the object is returned. If an error |
| 1848 * occurs during execution, then an error handle is returned. |
| 1849 */ |
| 1850 DART_EXPORT Dart_Handle Dart_InvokeConstructor(Dart_Handle object, |
| 1851 Dart_Handle name, |
| 1852 int number_of_arguments, |
| 1853 Dart_Handle* arguments); |
| 1854 |
| 1855 /** |
1832 * Gets the value of a field. | 1856 * Gets the value of a field. |
1833 * | 1857 * |
1834 * The 'container' parameter may be an object, type, or library. If | 1858 * The 'container' parameter may be an object, type, or library. If |
1835 * 'container' is an object, then this function will access an | 1859 * 'container' is an object, then this function will access an |
1836 * instance field. If 'container' is a type, then this function will | 1860 * instance field. If 'container' is a type, then this function will |
1837 * access a static field. If 'container' is a library, then this | 1861 * access a static field. If 'container' is a library, then this |
1838 * function will access a top-level variable. | 1862 * function will access a top-level variable. |
1839 * NOTE: This API call cannot be used to access fields of a type object. | 1863 * NOTE: This API call cannot be used to access fields of a type object. |
1840 * | 1864 * |
1841 * This function ignores field visibility (leading underscores in names). | 1865 * This function ignores field visibility (leading underscores in names). |
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2288 * | 2312 * |
2289 * \param object An object. | 2313 * \param object An object. |
2290 * \param peer A value to store in the peer field. | 2314 * \param peer A value to store in the peer field. |
2291 * | 2315 * |
2292 * \return Returns an error if 'object' is a subtype of Null, num, or | 2316 * \return Returns an error if 'object' is a subtype of Null, num, or |
2293 * bool. | 2317 * bool. |
2294 */ | 2318 */ |
2295 DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer); | 2319 DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer); |
2296 | 2320 |
2297 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ | 2321 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ |
OLD | NEW |