def RunGenerator(dart_library_template, dart_output_dir, dart_library_path, template_loader, backend_factory): options = GeneratorOptions( template_loader, webkit_database, type_registry, renamer) dart_library_emitter = DartLibraryEmitter( emitters, dart_library_template, dart_output_dir) html_system = HtmlInterfacesSystem( options, dart_library_emitter, backend_factory) generator.Generate( webkit_database, html_system, common_database, _webkit_renames) dart_library_emitter.EmitLibrary(dart_library_path, auxiliary_dir)
def RunGenerator(dart_libraries, dart_output_dir, template_loader, backend_factory): options = GeneratorOptions( template_loader, webkit_database, type_registry, renamer, metadata) dart_library_emitter = DartLibraryEmitter( emitters, dart_output_dir, dart_libraries) event_generator = HtmlEventGenerator(webkit_database, renamer, metadata, template_loader) def generate_interface(interface): backend = backend_factory(interface) interface_generator = HtmlDartInterfaceGenerator( options, dart_library_emitter, event_generator, interface, backend) interface_generator.Generate() generator.Generate(webkit_database, common_database, generate_interface) dart_library_emitter.EmitLibraries(auxiliary_dir)
def RunGenerator(dart_libraries, dart_output_dir, template_loader, backend_factory, dart_js_interop): options = GeneratorOptions(template_loader, webkit_database, type_registry, renamer, metadata, dart_js_interop, nnbd) dart_library_emitter = DartLibraryEmitter(emitters, dart_output_dir, dart_libraries) event_generator = HtmlEventGenerator(webkit_database, renamer, metadata, template_loader) def generate_interface(interface, gl_constants=None): backend = backend_factory(interface) interface_generator = HtmlDartInterfaceGenerator( options, dart_library_emitter, event_generator, interface, backend) interface_generator.Generate() if len(backend._gl_constants) > 0 and not (gl_constants is None): gl_constants.extend(backend._gl_constants) generator.Generate(webkit_database, common_database, generate_interface) dart_library_emitter.EmitLibraries(auxiliary_dir, dart_js_interop)