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 1988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1999 * Allocate a new object without invoking a constructor. | 1999 * Allocate a new object without invoking a constructor. |
2000 * | 2000 * |
2001 * \param type The type of an object to be allocated. | 2001 * \param type The type of an object to be allocated. |
2002 * | 2002 * |
2003 * \return The new object. If an error occurs during execution, then an | 2003 * \return The new object. If an error occurs during execution, then an |
2004 * error handle is returned. | 2004 * error handle is returned. |
2005 */ | 2005 */ |
2006 DART_EXPORT Dart_Handle Dart_Allocate(Dart_Handle type); | 2006 DART_EXPORT Dart_Handle Dart_Allocate(Dart_Handle type); |
2007 | 2007 |
2008 /** | 2008 /** |
2009 * Allocate a new object without invoking a constructor, and sets specified | |
2010 * native fields. | |
2011 * | |
2012 * \param args the Native arguments block passed into the native call. | |
srdjan
2014/06/20 20:36:58
There is no 'args' parameter.
| |
2013 * \param type The type of an object to be allocated. | |
2014 * \param num_native_fields The number of native fields to set. | |
2015 * \param native_fields An array containing the value of native fields. | |
2016 * | |
2017 * \return The new object. If an error occurs during execution, then an | |
2018 * error handle is returned. | |
2019 */ | |
2020 DART_EXPORT Dart_Handle Dart_AllocateWithNativeFields( | |
2021 Dart_Handle type, | |
2022 intptr_t num_native_fields, | |
2023 const intptr_t* native_fields); | |
2024 | |
2025 /** | |
2009 * Invokes a method or function. | 2026 * Invokes a method or function. |
2010 * | 2027 * |
2011 * The 'target' parameter may be an object, type, or library. If | 2028 * The 'target' parameter may be an object, type, or library. If |
2012 * 'target' is an object, then this function will invoke an instance | 2029 * 'target' is an object, then this function will invoke an instance |
2013 * method. If 'target' is a type, then this function will invoke a | 2030 * method. If 'target' is a type, then this function will invoke a |
2014 * static method. If 'target' is a library, then this function will | 2031 * static method. If 'target' is a library, then this function will |
2015 * invoke a top-level function from that library. | 2032 * invoke a top-level function from that library. |
2016 * NOTE: This API call cannot be used to invoke methods of a type object. | 2033 * NOTE: This API call cannot be used to invoke methods of a type object. |
2017 * | 2034 * |
2018 * This function ignores visibility (leading underscores in names). | 2035 * This function ignores visibility (leading underscores in names). |
(...skipping 23 matching lines...) Expand all Loading... | |
2042 * \return If no error occurs during execution, then the result of | 2059 * \return If no error occurs during execution, then the result of |
2043 * invoking the closure is returned. If an error occurs during | 2060 * invoking the closure is returned. If an error occurs during |
2044 * execution, then an error handle is returned. | 2061 * execution, then an error handle is returned. |
2045 */ | 2062 */ |
2046 DART_EXPORT Dart_Handle Dart_InvokeClosure(Dart_Handle closure, | 2063 DART_EXPORT Dart_Handle Dart_InvokeClosure(Dart_Handle closure, |
2047 int number_of_arguments, | 2064 int number_of_arguments, |
2048 Dart_Handle* arguments); | 2065 Dart_Handle* arguments); |
2049 | 2066 |
2050 /** | 2067 /** |
2051 * Invokes a Generative Constructor on an object that was previously | 2068 * Invokes a Generative Constructor on an object that was previously |
2052 * allocated using Dart_Allocate. | 2069 * allocated using Dart_Allocate/Dart_AllocateWithNativeFields. |
2053 * | 2070 * |
2054 * The 'target' parameter must be an object. | 2071 * The 'target' parameter must be an object. |
2055 * | 2072 * |
2056 * This function ignores visibility (leading underscores in names). | 2073 * This function ignores visibility (leading underscores in names). |
2057 * | 2074 * |
2058 * May generate an unhandled exception error. | 2075 * May generate an unhandled exception error. |
2059 * | 2076 * |
2060 * \param target An object. | 2077 * \param target An object. |
2061 * \param name The name of the constructor to invoke. | 2078 * \param name The name of the constructor to invoke. |
2062 * \param number_of_arguments Size of the arguments array. | 2079 * \param number_of_arguments Size of the arguments array. |
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2786 * NOTE: If multiple callbacks with the same name are registered, only the | 2803 * NOTE: If multiple callbacks with the same name are registered, only the |
2787 * last callback registered will be remembered. | 2804 * last callback registered will be remembered. |
2788 */ | 2805 */ |
2789 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( | 2806 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( |
2790 const char* name, | 2807 const char* name, |
2791 Dart_ServiceRequestCallback callback, | 2808 Dart_ServiceRequestCallback callback, |
2792 void* user_data); | 2809 void* user_data); |
2793 | 2810 |
2794 | 2811 |
2795 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ | 2812 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ |
OLD | NEW |