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

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, 6 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 1307 matching lines...) Expand 10 before | Expand all | Expand 10 after
1318 */ 1318 */
1319 DART_EXPORT bool Dart_IsInstance(Dart_Handle object); 1319 DART_EXPORT bool Dart_IsInstance(Dart_Handle object);
1320 DART_EXPORT bool Dart_IsNumber(Dart_Handle object); 1320 DART_EXPORT bool Dart_IsNumber(Dart_Handle object);
1321 DART_EXPORT bool Dart_IsInteger(Dart_Handle object); 1321 DART_EXPORT bool Dart_IsInteger(Dart_Handle object);
1322 DART_EXPORT bool Dart_IsDouble(Dart_Handle object); 1322 DART_EXPORT bool Dart_IsDouble(Dart_Handle object);
1323 DART_EXPORT bool Dart_IsBoolean(Dart_Handle object); 1323 DART_EXPORT bool Dart_IsBoolean(Dart_Handle object);
1324 DART_EXPORT bool Dart_IsString(Dart_Handle object); 1324 DART_EXPORT bool Dart_IsString(Dart_Handle object);
1325 DART_EXPORT bool Dart_IsStringLatin1(Dart_Handle object); /* (ISO-8859-1) */ 1325 DART_EXPORT bool Dart_IsStringLatin1(Dart_Handle object); /* (ISO-8859-1) */
1326 DART_EXPORT bool Dart_IsExternalString(Dart_Handle object); 1326 DART_EXPORT bool Dart_IsExternalString(Dart_Handle object);
1327 DART_EXPORT bool Dart_IsList(Dart_Handle object); 1327 DART_EXPORT bool Dart_IsList(Dart_Handle object);
1328 DART_EXPORT bool Dart_IsMap(Dart_Handle object);
1328 DART_EXPORT bool Dart_IsLibrary(Dart_Handle object); 1329 DART_EXPORT bool Dart_IsLibrary(Dart_Handle object);
1329 DART_EXPORT bool Dart_IsType(Dart_Handle handle); 1330 DART_EXPORT bool Dart_IsType(Dart_Handle handle);
1330 DART_EXPORT bool Dart_IsFunction(Dart_Handle handle); 1331 DART_EXPORT bool Dart_IsFunction(Dart_Handle handle);
1331 DART_EXPORT bool Dart_IsVariable(Dart_Handle handle); 1332 DART_EXPORT bool Dart_IsVariable(Dart_Handle handle);
1332 DART_EXPORT bool Dart_IsTypeVariable(Dart_Handle handle); 1333 DART_EXPORT bool Dart_IsTypeVariable(Dart_Handle handle);
1333 DART_EXPORT bool Dart_IsClosure(Dart_Handle object); 1334 DART_EXPORT bool Dart_IsClosure(Dart_Handle object);
1334 1335
1335 1336
1336 /* 1337 /*
1337 * ========= 1338 * =========
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
1769 /** 1770 /**
1770 * Gets the Object at some index of a List. 1771 * Gets the Object at some index of a List.
1771 * 1772 *
1772 * If the index is out of bounds, an error occurs. 1773 * If the index is out of bounds, an error occurs.
1773 * 1774 *
1774 * May generate an unhandled exception error. 1775 * May generate an unhandled exception error.
1775 * 1776 *
1776 * \param list A List. 1777 * \param list A List.
1777 * \param index A valid index into the List. 1778 * \param index A valid index into the List.
1778 * 1779 *
1779 * \return The Object in the List at the specified index if no errors 1780 * \return The Object in the List at the specified index if no error
1780 * occurs. Otherwise returns an error handle. 1781 * occurs. Otherwise returns an error handle.
1781 */ 1782 */
1782 DART_EXPORT Dart_Handle Dart_ListGetAt(Dart_Handle list, 1783 DART_EXPORT Dart_Handle Dart_ListGetAt(Dart_Handle list,
1783 intptr_t index); 1784 intptr_t index);
1784 1785
1785 /** 1786 /**
1786 * Sets the Object at some index of a List. 1787 * Sets the Object at some index of a List.
1787 * 1788 *
1788 * If the index is out of bounds, an error occurs. 1789 * If the index is out of bounds, an error occurs.
1789 * 1790 *
(...skipping 20 matching lines...) Expand all
1810 /** 1811 /**
1811 * May generate an unhandled exception error. 1812 * May generate an unhandled exception error.
1812 */ 1813 */
1813 DART_EXPORT Dart_Handle Dart_ListSetAsBytes(Dart_Handle list, 1814 DART_EXPORT Dart_Handle Dart_ListSetAsBytes(Dart_Handle list,
1814 intptr_t offset, 1815 intptr_t offset,
1815 uint8_t* native_array, 1816 uint8_t* native_array,
1816 intptr_t length); 1817 intptr_t length);
1817 1818
1818 1819
1819 /* 1820 /*
1821 * ====
1822 * Maps
1823 * ====
1824 */
1825
1826 /**
1827 * Gets the Object at some key of a Map.
1828 *
1829 * May generate an unhandled exception error.
1830 *
1831 * \param map A Map.
1832 * \param key An Object.
1833 *
1834 * \return The value in the map at the specified key, null if the map does not
1835 * contain the key, or an error handle.
1836 */
1837 DART_EXPORT Dart_Handle Dart_MapGetAt(Dart_Handle map, Dart_Handle key);
1838
1839 /**
1840 * Returns whether the Map contains a given key.
1841 *
1842 * May generate an unhandled exception error.
1843 *
1844 * \param map A Map.
1845 *
1846 * \return A handle on a boolean indicating whether map contains the key.
1847 * Otherwise returns an error handle.
1848 */
1849 DART_EXPORT Dart_Handle Dart_MapContainsKey(Dart_Handle map, Dart_Handle key);
1850
1851 /**
1852 * Gets the list of keys of a Map.
1853 *
1854 * May generate an unhandled exception error.
1855 *
1856 * \param map A Map.
1857 *
1858 * \return The list of key Objects if no error occurs. Otherwise returns an
1859 * error handle.
1860 */
1861 DART_EXPORT Dart_Handle Dart_MapKeys(Dart_Handle map);
1862
1863
1864 /*
1820 * ========== 1865 * ==========
1821 * Typed Data 1866 * Typed Data
1822 * ========== 1867 * ==========
1823 */ 1868 */
1824 1869
1825 typedef enum { 1870 typedef enum {
1826 Dart_TypedData_kByteData = 0, 1871 Dart_TypedData_kByteData = 0,
1827 Dart_TypedData_kInt8, 1872 Dart_TypedData_kInt8,
1828 Dart_TypedData_kUint8, 1873 Dart_TypedData_kUint8,
1829 Dart_TypedData_kUint8Clamped, 1874 Dart_TypedData_kUint8Clamped,
(...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after
2724 * NOTE: If multiple callbacks with the same name are registered, only the 2769 * NOTE: If multiple callbacks with the same name are registered, only the
2725 * last callback registered will be remembered. 2770 * last callback registered will be remembered.
2726 */ 2771 */
2727 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( 2772 DART_EXPORT void Dart_RegisterRootServiceRequestCallback(
2728 const char* name, 2773 const char* name,
2729 Dart_ServiceRequestCallback callback, 2774 Dart_ServiceRequestCallback callback,
2730 void* user_data); 2775 void* user_data);
2731 2776
2732 2777
2733 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ 2778 #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