Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(120)

Side by Side Diff: runtime/include/dart_api.h

Issue 23300004: Added Dart API methods: (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1992 matching lines...) Expand 10 before | Expand all | Expand 10 after
2003 * \param arg_index Index of the desired argument in the structure above. 2003 * \param arg_index Index of the desired argument in the structure above.
2004 * \param peer Returns the peer pointer if the String is an external String. 2004 * \param peer Returns the peer pointer if the String is an external String.
2005 * \return the String object if no error occurs. Otherwise returns 2005 * \return the String object if no error occurs. Otherwise returns
2006 * an error handle. 2006 * an error handle.
2007 */ 2007 */
2008 DART_EXPORT Dart_Handle Dart_GetNativeStringArgument(Dart_NativeArguments args, 2008 DART_EXPORT Dart_Handle Dart_GetNativeStringArgument(Dart_NativeArguments args,
2009 int arg_index, 2009 int arg_index,
2010 void** peer); 2010 void** peer);
2011 2011
2012 /** 2012 /**
2013 * Gets an integer native argument at some index.
2014 * \param args Native arguments structure.
2015 * \param arg_index Index of the desired argument in the structure above.
2016 * \param value Returns the integer value if the argument is an Integer.
2017 * \return Success if no error occurs. Otherwise returns an error handle.
2018 */
2019 DART_EXPORT Dart_Handle Dart_GetNativeIntegerArgument(Dart_NativeArguments args,
2020 int index,
2021 int64_t* value);
2022
2023 /**
2024 * Gets a boolean native argument at some index.
2025 * \param args Native arguments structure.
2026 * \param arg_index Index of the desired argument in the structure above.
2027 * \param value Returns the boolean value if the argument is a Boolean.
2028 * \return Success if no error occurs. Otherwise returns an error handle.
2029 */
2030 DART_EXPORT Dart_Handle Dart_GetNativeBooleanArgument(Dart_NativeArguments args,
2031 int index,
2032 bool* value);
2033
2034 /**
2035 * Gets a double native argument at some index.
2036 * \param args Native arguments structure.
2037 * \param arg_index Index of the desired argument in the structure above.
2038 * \param value Returns the double value if the argument is a double.
2039 * \return Success if no error occurs. Otherwise returns an error handle.
2040 */
2041 DART_EXPORT Dart_Handle Dart_GetNativeDoubleArgument(Dart_NativeArguments args,
2042 int index,
2043 double* value);
2044
2045 /**
2013 * Sets the return value for a native function. 2046 * Sets the return value for a native function.
2014 */ 2047 */
2015 DART_EXPORT void Dart_SetReturnValue(Dart_NativeArguments args, 2048 DART_EXPORT void Dart_SetReturnValue(Dart_NativeArguments args,
2016 Dart_Handle retval); 2049 Dart_Handle retval);
2017 2050
2018 DART_EXPORT void Dart_SetWeakHandleReturnValue(Dart_NativeArguments args, 2051 DART_EXPORT void Dart_SetWeakHandleReturnValue(Dart_NativeArguments args,
2019 Dart_WeakPersistentHandle rval); 2052 Dart_WeakPersistentHandle rval);
2020 2053
2021 DART_EXPORT void Dart_SetBooleanReturnValue(Dart_NativeArguments args, 2054 DART_EXPORT void Dart_SetBooleanReturnValue(Dart_NativeArguments args,
2022 bool retval); 2055 bool retval);
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
2253 * 2286 *
2254 * \param object An object. 2287 * \param object An object.
2255 * \param peer A value to store in the peer field. 2288 * \param peer A value to store in the peer field.
2256 * 2289 *
2257 * \return Returns an error if 'object' is a subtype of Null, num, or 2290 * \return Returns an error if 'object' is a subtype of Null, num, or
2258 * bool. 2291 * bool.
2259 */ 2292 */
2260 DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer); 2293 DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer);
2261 2294
2262 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ 2295 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698