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

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

Issue 392043003: The dart version of typeddata library has changed to be compatible with the dart2js implementation (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 5 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/lib/typed_data.dart » ('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 1305 matching lines...) Expand 10 before | Expand all | Expand 10 after
1316 DART_EXPORT bool Dart_IsStringLatin1(Dart_Handle object); /* (ISO-8859-1) */ 1316 DART_EXPORT bool Dart_IsStringLatin1(Dart_Handle object); /* (ISO-8859-1) */
1317 DART_EXPORT bool Dart_IsExternalString(Dart_Handle object); 1317 DART_EXPORT bool Dart_IsExternalString(Dart_Handle object);
1318 DART_EXPORT bool Dart_IsList(Dart_Handle object); 1318 DART_EXPORT bool Dart_IsList(Dart_Handle object);
1319 DART_EXPORT bool Dart_IsMap(Dart_Handle object); 1319 DART_EXPORT bool Dart_IsMap(Dart_Handle object);
1320 DART_EXPORT bool Dart_IsLibrary(Dart_Handle object); 1320 DART_EXPORT bool Dart_IsLibrary(Dart_Handle object);
1321 DART_EXPORT bool Dart_IsType(Dart_Handle handle); 1321 DART_EXPORT bool Dart_IsType(Dart_Handle handle);
1322 DART_EXPORT bool Dart_IsFunction(Dart_Handle handle); 1322 DART_EXPORT bool Dart_IsFunction(Dart_Handle handle);
1323 DART_EXPORT bool Dart_IsVariable(Dart_Handle handle); 1323 DART_EXPORT bool Dart_IsVariable(Dart_Handle handle);
1324 DART_EXPORT bool Dart_IsTypeVariable(Dart_Handle handle); 1324 DART_EXPORT bool Dart_IsTypeVariable(Dart_Handle handle);
1325 DART_EXPORT bool Dart_IsClosure(Dart_Handle object); 1325 DART_EXPORT bool Dart_IsClosure(Dart_Handle object);
1326 DART_EXPORT bool Dart_IsTypedData(Dart_Handle object);
1327 DART_EXPORT bool Dart_IsByteBuffer(Dart_Handle object);
1326 1328
1327 1329
1328 /* 1330 /*
1329 * ========= 1331 * =========
1330 * Instances 1332 * Instances
1331 * ========= 1333 * =========
1332 */ 1334 */
1333 1335
1334 /* 1336 /*
1335 * For the purposes of the embedding api, not all objects returned are 1337 * For the purposes of the embedding api, not all objects returned are
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
1913 * \param peer An external pointer to associate with this array. 1915 * \param peer An external pointer to associate with this array.
1914 * 1916 *
1915 * \return The TypedData object if no error occurs. Otherwise returns 1917 * \return The TypedData object if no error occurs. Otherwise returns
1916 * an error handle. 1918 * an error handle.
1917 */ 1919 */
1918 DART_EXPORT Dart_Handle Dart_NewExternalTypedData(Dart_TypedData_Type type, 1920 DART_EXPORT Dart_Handle Dart_NewExternalTypedData(Dart_TypedData_Type type,
1919 void* data, 1921 void* data,
1920 intptr_t length); 1922 intptr_t length);
1921 1923
1922 /** 1924 /**
1925 * Returns a ByteBuffer object for the typed data.
1926 *
1927 * \param type_data The TypedData object.
1928 *
1929 * \return The ByteBuffer object if no error occurs. Otherwise returns
1930 * an error handle.
1931 */
1932 DART_EXPORT Dart_Handle Dart_NewByteBuffer(Dart_Handle typed_data);
1933
1934 /**
1923 * Acquires access to the internal data address of a TypedData object. 1935 * Acquires access to the internal data address of a TypedData object.
1924 * 1936 *
1925 * \param object The typed data object whose internal data address is to 1937 * \param object The typed data object whose internal data address is to
1926 * be accessed. 1938 * be accessed.
1927 * \param type The type of the object is returned here. 1939 * \param type The type of the object is returned here.
1928 * \param data The internal data address is returned here. 1940 * \param data The internal data address is returned here.
1929 * \param len Size of the typed array is returned here. 1941 * \param len Size of the typed array is returned here.
1930 * 1942 *
1931 * Note: When the internal address of the object is acquired any calls to a 1943 * Note: When the internal address of the object is acquired any calls to a
1932 * Dart API function that could potentially allocate an object or run 1944 * Dart API function that could potentially allocate an object or run
(...skipping 12 matching lines...) Expand all
1945 * Dart_TypedDataAcquireData. 1957 * Dart_TypedDataAcquireData.
1946 * 1958 *
1947 * \param object The typed data object whose internal data address is to be 1959 * \param object The typed data object whose internal data address is to be
1948 * released. 1960 * released.
1949 * 1961 *
1950 * \return Success if the internal data address is released successfully. 1962 * \return Success if the internal data address is released successfully.
1951 * Otherwise, returns an error handle. 1963 * Otherwise, returns an error handle.
1952 */ 1964 */
1953 DART_EXPORT Dart_Handle Dart_TypedDataReleaseData(Dart_Handle object); 1965 DART_EXPORT Dart_Handle Dart_TypedDataReleaseData(Dart_Handle object);
1954 1966
1967 /**
1968 * Returns the TypedData object associated with the ByteBuffer object.
1969 *
1970 * \param byte_buffer The ByteBuffer object.
1971 *
1972 * \return The TypedData object if no error occurs. Otherwise returns
1973 * an error handle.
1974 */
1975 DART_EXPORT Dart_Handle Dart_GetDataFromByteBuffer(Dart_Handle byte_buffer);
1976
1955 1977
1956 /* 1978 /*
1957 * ============================================================ 1979 * ============================================================
1958 * Invoking Constructors, Methods, Closures and Field accessors 1980 * Invoking Constructors, Methods, Closures and Field accessors
1959 * ============================================================ 1981 * ============================================================
1960 */ 1982 */
1961 1983
1962 /** 1984 /**
1963 * Invokes a constructor, creating a new object. 1985 * Invokes a constructor, creating a new object.
1964 * 1986 *
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after
2788 * NOTE: If multiple callbacks with the same name are registered, only the 2810 * NOTE: If multiple callbacks with the same name are registered, only the
2789 * last callback registered will be remembered. 2811 * last callback registered will be remembered.
2790 */ 2812 */
2791 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( 2813 DART_EXPORT void Dart_RegisterRootServiceRequestCallback(
2792 const char* name, 2814 const char* name,
2793 Dart_ServiceRequestCallback callback, 2815 Dart_ServiceRequestCallback callback,
2794 void* user_data); 2816 void* user_data);
2795 2817
2796 2818
2797 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ 2819 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */
OLDNEW
« no previous file with comments | « no previous file | runtime/lib/typed_data.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698