| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 2 # Copyright (c) 2011, 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 """This module generates Dart APIs from the IDL database.""" | 6 """This module generates Dart APIs from the IDL database.""" |
| 7 | 7 |
| 8 import emitter | 8 import emitter |
| 9 import idlnode | 9 import idlnode |
| 10 import logging | 10 import logging |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 # information in IDL to create the signature. | 69 # information in IDL to create the signature. |
| 70 # | 70 # |
| 71 # Each entry is of the form: | 71 # Each entry is of the form: |
| 72 # type name: constructor parameters | 72 # type name: constructor parameters |
| 73 _constructable_types = { | 73 _constructable_types = { |
| 74 'AudioContext': '', | 74 'AudioContext': '', |
| 75 'FileReader': '', | 75 'FileReader': '', |
| 76 'XMLHttpRequest': '', | 76 'XMLHttpRequest': '', |
| 77 'WebKitCSSMatrix': '[String spec]', | 77 'WebKitCSSMatrix': '[String spec]', |
| 78 'WebKitPoint': 'num x, num y', | 78 'WebKitPoint': 'num x, num y', |
| 79 'WebSocket': 'String url', |
| 79 # dart:html types | 80 # dart:html types |
| 80 'CSSMatrix': '[String spec]', | 81 'CSSMatrix': '[String spec]', |
| 81 'Point': 'num x, num y', | 82 'Point': 'num x, num y', |
| 82 } | 83 } |
| 83 | 84 |
| 84 # | 85 # |
| 85 # Interface version of the DOM needs to delegate typed array constructors to a | 86 # Interface version of the DOM needs to delegate typed array constructors to a |
| 86 # factory provider. | 87 # factory provider. |
| 87 # | 88 # |
| 88 _interface_factories = { | 89 _interface_factories = { |
| (...skipping 2397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2486 Arguments: | 2487 Arguments: |
| 2487 info: An OperationInfo object. | 2488 info: An OperationInfo object. |
| 2488 """ | 2489 """ |
| 2489 # TODO(vsm): Handle overloads. | 2490 # TODO(vsm): Handle overloads. |
| 2490 self._members_emitter.Emit( | 2491 self._members_emitter.Emit( |
| 2491 '\n' | 2492 '\n' |
| 2492 ' $TYPE $NAME($ARGS) native;\n', | 2493 ' $TYPE $NAME($ARGS) native;\n', |
| 2493 TYPE=info.type_name, | 2494 TYPE=info.type_name, |
| 2494 NAME=info.name, | 2495 NAME=info.name, |
| 2495 ARGS=info.arg_implementation_declaration) | 2496 ARGS=info.arg_implementation_declaration) |
| OLD | NEW |