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

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

Issue 11824067: Support for embedded Dart scripts (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 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 | « runtime/bin/dartutils.cc ('k') | 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 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef INCLUDE_DART_API_H_ 5 #ifndef INCLUDE_DART_API_H_
6 #define INCLUDE_DART_API_H_ 6 #define INCLUDE_DART_API_H_
7 7
8 /** \mainpage Dart Embedding API Reference 8 /** \mainpage Dart Embedding API Reference
9 * 9 *
10 * Dart is a class-based programming language for creating structured 10 * Dart is a class-based programming language for creating structured
(...skipping 2591 matching lines...) Expand 10 before | Expand all | Expand 10 after
2602 2602
2603 /** 2603 /**
2604 * Loads the root script for the current isolate. 2604 * Loads the root script for the current isolate.
2605 * 2605 *
2606 * TODO(turnidge): Document. 2606 * TODO(turnidge): Document.
2607 */ 2607 */
2608 DART_EXPORT Dart_Handle Dart_LoadScript(Dart_Handle url, 2608 DART_EXPORT Dart_Handle Dart_LoadScript(Dart_Handle url,
2609 Dart_Handle source); 2609 Dart_Handle source);
2610 2610
2611 /** 2611 /**
2612 * Loads the root script for the current isolate. The script can be
2613 * embedded in another file, for example in an html file.
2614 *
2615 * TODO(turnidge): Document.
2616 *
2617 * \line_offset is the number of text lines before the
2618 * first line of the Dart script in the containing file.
2619 *
2620 * \col_offset is the number of characters before the first character
2621 * in the first line of the Dart script.
2622 */
2623 DART_EXPORT Dart_Handle Dart_LoadEmbeddedScript(
2624 Dart_Handle url,
2625 Dart_Handle source,
2626 intptr_t line_offset,
2627 intptr_t col_offset);
2628
2629 /**
2612 * Loads the root script for current isolate from a snapshot. 2630 * Loads the root script for current isolate from a snapshot.
2613 * 2631 *
2614 * \param buffer A buffer which contains a snapshot of the script. 2632 * \param buffer A buffer which contains a snapshot of the script.
2615 * 2633 *
2616 * \return If no error occurs, the Library object corresponding to the root 2634 * \return If no error occurs, the Library object corresponding to the root
2617 * script is returned. Otherwise an error handle is returned. 2635 * script is returned. Otherwise an error handle is returned.
2618 */ 2636 */
2619 DART_EXPORT Dart_Handle Dart_LoadScriptFromSnapshot(const uint8_t* buffer); 2637 DART_EXPORT Dart_Handle Dart_LoadScriptFromSnapshot(const uint8_t* buffer);
2620 2638
2621 /** 2639 /**
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
2789 * 2807 *
2790 * \param object An object. 2808 * \param object An object.
2791 * \param peer A value to store in the peer field. 2809 * \param peer A value to store in the peer field.
2792 * 2810 *
2793 * \return Returns an error if 'object' is a subtype of Null, num, or 2811 * \return Returns an error if 'object' is a subtype of Null, num, or
2794 * bool. 2812 * bool.
2795 */ 2813 */
2796 DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer); 2814 DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer);
2797 2815
2798 #endif // INCLUDE_DART_API_H_ 2816 #endif // INCLUDE_DART_API_H_
OLDNEW
« no previous file with comments | « runtime/bin/dartutils.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698