OLD | NEW |
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 2452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2463 * encountered while loading libraries or scripts in the isolate. | 2463 * encountered while loading libraries or scripts in the isolate. |
2464 * | 2464 * |
2465 * \return If no error occurs, the handler is set for the isolate. | 2465 * \return If no error occurs, the handler is set for the isolate. |
2466 * Otherwise an error handle is returned. | 2466 * Otherwise an error handle is returned. |
2467 * | 2467 * |
2468 * TODO(turnidge): Document. | 2468 * TODO(turnidge): Document. |
2469 */ | 2469 */ |
2470 DART_EXPORT Dart_Handle Dart_SetLibraryTagHandler( | 2470 DART_EXPORT Dart_Handle Dart_SetLibraryTagHandler( |
2471 Dart_LibraryTagHandler handler); | 2471 Dart_LibraryTagHandler handler); |
2472 | 2472 |
2473 /** | |
2474 * Sets the import map for the current isolate. | |
2475 * | |
2476 * The import map is a List of Strings, representing a set of (name, | |
2477 * value) pairs. The import map is used during the resolution of # | |
2478 * directives in source files to implement string interpolation. | |
2479 * | |
2480 * For example, if a source file imports: | |
2481 * | |
2482 * #import('${foo}/dart.html'); | |
2483 * | |
2484 * And the import map is: | |
2485 * | |
2486 * [ "foo", "/home/user" ] | |
2487 * | |
2488 * Then the import would resolve to: | |
2489 * | |
2490 * #import('/home/user/dart.html'); | |
2491 * | |
2492 * \param import_map A List of Strings interpreted as a String to | |
2493 * String mapping. | |
2494 * \return If no error occurs, the import map is set for the isolate. | |
2495 * Otherwise an error handle is returned. | |
2496 */ | |
2497 DART_EXPORT Dart_Handle Dart_SetImportMap(Dart_Handle import_map); | |
2498 | 2473 |
2499 /** | 2474 /** |
2500 * Loads the root script for the current isolate. | 2475 * Loads the root script for the current isolate. |
2501 * | 2476 * |
2502 * TODO(turnidge): Document. | 2477 * TODO(turnidge): Document. |
2503 */ | 2478 */ |
2504 DART_EXPORT Dart_Handle Dart_LoadScript(Dart_Handle url, | 2479 DART_EXPORT Dart_Handle Dart_LoadScript(Dart_Handle url, |
2505 Dart_Handle source); | 2480 Dart_Handle source); |
2506 | 2481 |
2507 /** | 2482 /** |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2630 | 2605 |
2631 typedef void (*Dart_FileWriterFunction)(const char* buffer, int64_t num_bytes); | 2606 typedef void (*Dart_FileWriterFunction)(const char* buffer, int64_t num_bytes); |
2632 | 2607 |
2633 // Support for generating symbol maps for use by the Linux perf tool. | 2608 // Support for generating symbol maps for use by the Linux perf tool. |
2634 DART_EXPORT void Dart_InitPerfEventsSupport(Dart_FileWriterFunction function); | 2609 DART_EXPORT void Dart_InitPerfEventsSupport(Dart_FileWriterFunction function); |
2635 | 2610 |
2636 // Support for generating flow graph compiler debugging output into a file. | 2611 // Support for generating flow graph compiler debugging output into a file. |
2637 DART_EXPORT void Dart_InitFlowGraphPrinting(Dart_FileWriterFunction function); | 2612 DART_EXPORT void Dart_InitFlowGraphPrinting(Dart_FileWriterFunction function); |
2638 | 2613 |
2639 #endif // INCLUDE_DART_API_H_ | 2614 #endif // INCLUDE_DART_API_H_ |
OLD | NEW |