| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 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 """This module provides shared functionality for systems to generate | 6 """This module provides shared functionality for systems to generate |
| 7 Dart APIs from the IDL database.""" | 7 Dart APIs from the IDL database.""" |
| 8 | 8 |
| 9 import re | 9 import re |
| 10 | 10 |
| (...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 634 'DOMException': IDLTypeInfo('DOMException', native_type='DOMCoreException'), | 634 'DOMException': IDLTypeInfo('DOMException', native_type='DOMCoreException'), |
| 635 'DOMStringList': IDLTypeInfo('DOMStringList', dart_type='List<String>', cust
om_to_native=True), | 635 'DOMStringList': IDLTypeInfo('DOMStringList', dart_type='List<String>', cust
om_to_native=True), |
| 636 'DOMStringMap': IDLTypeInfo('DOMStringMap', dart_type='Map<String, String>')
, | 636 'DOMStringMap': IDLTypeInfo('DOMStringMap', dart_type='Map<String, String>')
, |
| 637 'DOMWindow': IDLTypeInfo('DOMWindow', custom_to_dart=True), | 637 'DOMWindow': IDLTypeInfo('DOMWindow', custom_to_dart=True), |
| 638 'Element': IDLTypeInfo('Element', custom_to_dart=True), | 638 'Element': IDLTypeInfo('Element', custom_to_dart=True), |
| 639 'EventListener': IDLTypeInfo('EventListener', custom_to_native=True), | 639 'EventListener': IDLTypeInfo('EventListener', custom_to_native=True), |
| 640 'EventTarget': IDLTypeInfo('EventTarget', custom_to_native=True), | 640 'EventTarget': IDLTypeInfo('EventTarget', custom_to_native=True), |
| 641 'HTMLElement': IDLTypeInfo('HTMLElement', custom_to_dart=True), | 641 'HTMLElement': IDLTypeInfo('HTMLElement', custom_to_dart=True), |
| 642 'IDBAny': IDLTypeInfo('IDBAny', dart_type='Dynamic', custom_to_native=True), | 642 'IDBAny': IDLTypeInfo('IDBAny', dart_type='Dynamic', custom_to_native=True), |
| 643 'IDBKey': IDLTypeInfo('IDBKey', dart_type='Dynamic', custom_to_native=True), | 643 'IDBKey': IDLTypeInfo('IDBKey', dart_type='Dynamic', custom_to_native=True), |
| 644 'MediaQueryListListener': IDLTypeInfo('MediaQueryListListener', custom_to_na
tive=True), | |
| 645 'StyleSheet': IDLTypeInfo('StyleSheet', conversion_includes=['CSSStyleSheet'
]), | 644 'StyleSheet': IDLTypeInfo('StyleSheet', conversion_includes=['CSSStyleSheet'
]), |
| 646 'SVGElement': IDLTypeInfo('SVGElement', custom_to_dart=True), | 645 'SVGElement': IDLTypeInfo('SVGElement', custom_to_dart=True), |
| 647 | 646 |
| 648 'SVGAngle': SVGTearOffIDLTypeInfo('SVGAngle'), | 647 'SVGAngle': SVGTearOffIDLTypeInfo('SVGAngle'), |
| 649 'SVGLength': SVGTearOffIDLTypeInfo('SVGLength'), | 648 'SVGLength': SVGTearOffIDLTypeInfo('SVGLength'), |
| 650 'SVGLengthList': SVGTearOffIDLTypeInfo('SVGLengthList'), | 649 'SVGLengthList': SVGTearOffIDLTypeInfo('SVGLengthList'), |
| 651 'SVGMatrix': SVGTearOffIDLTypeInfo('SVGMatrix'), | 650 'SVGMatrix': SVGTearOffIDLTypeInfo('SVGMatrix'), |
| 652 'SVGNumber': SVGTearOffIDLTypeInfo('SVGNumber', native_type='SVGPropertyTear
Off<float>'), | 651 'SVGNumber': SVGTearOffIDLTypeInfo('SVGNumber', native_type='SVGPropertyTear
Off<float>'), |
| 653 'SVGNumberList': SVGTearOffIDLTypeInfo('SVGNumberList'), | 652 'SVGNumberList': SVGTearOffIDLTypeInfo('SVGNumberList'), |
| 654 'SVGPathSegList': SVGTearOffIDLTypeInfo('SVGPathSegList', native_type='SVGPa
thSegListPropertyTearOff'), | 653 'SVGPathSegList': SVGTearOffIDLTypeInfo('SVGPathSegList', native_type='SVGPa
thSegListPropertyTearOff'), |
| (...skipping 13 matching lines...) Expand all Loading... |
| 668 '"SVGAnimatedListPropertyTearOff.h"', | 667 '"SVGAnimatedListPropertyTearOff.h"', |
| 669 '"SVGTransformListPropertyTearOff.h"', | 668 '"SVGTransformListPropertyTearOff.h"', |
| 670 '"SVGPathSegListPropertyTearOff.h"', | 669 '"SVGPathSegListPropertyTearOff.h"', |
| 671 ] | 670 ] |
| 672 | 671 |
| 673 def GetIDLTypeInfo(idl_type_name): | 672 def GetIDLTypeInfo(idl_type_name): |
| 674 match = re.match(r'sequence<(\w+)>$', idl_type_name) | 673 match = re.match(r'sequence<(\w+)>$', idl_type_name) |
| 675 if match: | 674 if match: |
| 676 return SequenceIDLTypeInfo(idl_type_name, GetIDLTypeInfo(match.group(1))) | 675 return SequenceIDLTypeInfo(idl_type_name, GetIDLTypeInfo(match.group(1))) |
| 677 return _idl_type_registry.get(idl_type_name, IDLTypeInfo(idl_type_name)) | 676 return _idl_type_registry.get(idl_type_name, IDLTypeInfo(idl_type_name)) |
| OLD | NEW |