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

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

Issue 289553002: Add accessors for Maps to the embedding API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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') | runtime/vm/dart_api_impl.cc » ('J')
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 1297 matching lines...) Expand 10 before | Expand all | Expand 10 after
1308 */ 1308 */
1309 DART_EXPORT bool Dart_IsInstance(Dart_Handle object); 1309 DART_EXPORT bool Dart_IsInstance(Dart_Handle object);
1310 DART_EXPORT bool Dart_IsNumber(Dart_Handle object); 1310 DART_EXPORT bool Dart_IsNumber(Dart_Handle object);
1311 DART_EXPORT bool Dart_IsInteger(Dart_Handle object); 1311 DART_EXPORT bool Dart_IsInteger(Dart_Handle object);
1312 DART_EXPORT bool Dart_IsDouble(Dart_Handle object); 1312 DART_EXPORT bool Dart_IsDouble(Dart_Handle object);
1313 DART_EXPORT bool Dart_IsBoolean(Dart_Handle object); 1313 DART_EXPORT bool Dart_IsBoolean(Dart_Handle object);
1314 DART_EXPORT bool Dart_IsString(Dart_Handle object); 1314 DART_EXPORT bool Dart_IsString(Dart_Handle object);
1315 DART_EXPORT bool Dart_IsStringLatin1(Dart_Handle object); /* (ISO-8859-1) */ 1315 DART_EXPORT bool Dart_IsStringLatin1(Dart_Handle object); /* (ISO-8859-1) */
1316 DART_EXPORT bool Dart_IsExternalString(Dart_Handle object); 1316 DART_EXPORT bool Dart_IsExternalString(Dart_Handle object);
1317 DART_EXPORT bool Dart_IsList(Dart_Handle object); 1317 DART_EXPORT bool Dart_IsList(Dart_Handle object);
1318 DART_EXPORT bool Dart_IsMap(Dart_Handle object);
1318 DART_EXPORT bool Dart_IsLibrary(Dart_Handle object); 1319 DART_EXPORT bool Dart_IsLibrary(Dart_Handle object);
1319 DART_EXPORT bool Dart_IsType(Dart_Handle handle); 1320 DART_EXPORT bool Dart_IsType(Dart_Handle handle);
1320 DART_EXPORT bool Dart_IsFunction(Dart_Handle handle); 1321 DART_EXPORT bool Dart_IsFunction(Dart_Handle handle);
1321 DART_EXPORT bool Dart_IsVariable(Dart_Handle handle); 1322 DART_EXPORT bool Dart_IsVariable(Dart_Handle handle);
1322 DART_EXPORT bool Dart_IsTypeVariable(Dart_Handle handle); 1323 DART_EXPORT bool Dart_IsTypeVariable(Dart_Handle handle);
1323 DART_EXPORT bool Dart_IsClosure(Dart_Handle object); 1324 DART_EXPORT bool Dart_IsClosure(Dart_Handle object);
1324 1325
1325 1326
1326 /* 1327 /*
1327 * ========= 1328 * =========
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
1759 /** 1760 /**
1760 * Gets the Object at some index of a List. 1761 * Gets the Object at some index of a List.
1761 * 1762 *
1762 * If the index is out of bounds, an error occurs. 1763 * If the index is out of bounds, an error occurs.
1763 * 1764 *
1764 * May generate an unhandled exception error. 1765 * May generate an unhandled exception error.
1765 * 1766 *
1766 * \param list A List. 1767 * \param list A List.
1767 * \param index A valid index into the List. 1768 * \param index A valid index into the List.
1768 * 1769 *
1769 * \return The Object in the List at the specified index if no errors 1770 * \return The Object in the List at the specified index if no error
1770 * occurs. Otherwise returns an error handle. 1771 * occurs. Otherwise returns an error handle.
1771 */ 1772 */
1772 DART_EXPORT Dart_Handle Dart_ListGetAt(Dart_Handle list, 1773 DART_EXPORT Dart_Handle Dart_ListGetAt(Dart_Handle list,
1773 intptr_t index); 1774 intptr_t index);
1774 1775
1775 /** 1776 /**
1776 * Sets the Object at some index of a List. 1777 * Sets the Object at some index of a List.
1777 * 1778 *
1778 * If the index is out of bounds, an error occurs. 1779 * If the index is out of bounds, an error occurs.
1779 * 1780 *
(...skipping 20 matching lines...) Expand all
1800 /** 1801 /**
1801 * May generate an unhandled exception error. 1802 * May generate an unhandled exception error.
1802 */ 1803 */
1803 DART_EXPORT Dart_Handle Dart_ListSetAsBytes(Dart_Handle list, 1804 DART_EXPORT Dart_Handle Dart_ListSetAsBytes(Dart_Handle list,
1804 intptr_t offset, 1805 intptr_t offset,
1805 uint8_t* native_array, 1806 uint8_t* native_array,
1806 intptr_t length); 1807 intptr_t length);
1807 1808
1808 1809
1809 /* 1810 /*
1811 * ====
1812 * Maps
1813 * ====
1814 */
1815
1816 /**
1817 * Gets the Object at some key of a Map.
1818 *
1819 * May generate an unhandled exception error.
1820 *
1821 * \param map A Map.
1822 * \param key An Object.
1823 *
1824 * \return The Object in the Map at the specified key if no error occurs.
koda 2014/05/22 23:40:24 Mention that null is returned if the map does not
rmacnak 2014/05/30 17:23:33 Done.
1825 * Otherwise returns an error handle.
1826 */
1827 DART_EXPORT Dart_Handle Dart_MapGetAt(Dart_Handle map, Dart_Handle key);
1828
1829 /**
1830 * Returns whether the Map contains a given key.
1831 *
1832 * May generate an unhandled exception error.
1833 *
1834 * \param map A Map.
1835 *
1836 * \return A handle on a boolean indicating whether map contains the key.
1837 * Otherwise returns an error handle.
1838 */
1839 DART_EXPORT Dart_Handle Dart_MapContainsKey(Dart_Handle map, Dart_Handle key);
1840
1841 /**
1842 * Gets the list of keys of a Map.
1843 *
1844 * May generate an unhandled exception error.
1845 *
1846 * \param map A Map.
1847 *
1848 * \return The list of key Objects if no error occurs. Otherwise returns an
1849 * error handle.
1850 */
1851 DART_EXPORT Dart_Handle Dart_MapKeys(Dart_Handle map);
1852
1853
1854 /*
1810 * ========== 1855 * ==========
1811 * Typed Data 1856 * Typed Data
1812 * ========== 1857 * ==========
1813 */ 1858 */
1814 1859
1815 typedef enum { 1860 typedef enum {
1816 Dart_TypedData_kByteData = 0, 1861 Dart_TypedData_kByteData = 0,
1817 Dart_TypedData_kInt8, 1862 Dart_TypedData_kInt8,
1818 Dart_TypedData_kUint8, 1863 Dart_TypedData_kUint8,
1819 Dart_TypedData_kUint8Clamped, 1864 Dart_TypedData_kUint8Clamped,
(...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after
2714 * NOTE: If multiple callbacks with the same name are registered, only the 2759 * NOTE: If multiple callbacks with the same name are registered, only the
2715 * last callback registered will be remembered. 2760 * last callback registered will be remembered.
2716 */ 2761 */
2717 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( 2762 DART_EXPORT void Dart_RegisterRootServiceRequestCallback(
2718 const char* name, 2763 const char* name,
2719 Dart_ServiceRequestCallback callback, 2764 Dart_ServiceRequestCallback callback,
2720 void* user_data); 2765 void* user_data);
2721 2766
2722 2767
2723 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ 2768 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | runtime/vm/dart_api_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698