| 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 copy | 9 import copy |
| 10 import json | 10 import json |
| (...skipping 1460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1471 'Int32Array': TypedArrayTypeData('int'), | 1471 'Int32Array': TypedArrayTypeData('int'), |
| 1472 'Uint8Array': TypedArrayTypeData('int'), | 1472 'Uint8Array': TypedArrayTypeData('int'), |
| 1473 'Uint8ClampedArray': TypedArrayTypeData('int'), | 1473 'Uint8ClampedArray': TypedArrayTypeData('int'), |
| 1474 'Uint16Array': TypedArrayTypeData('int'), | 1474 'Uint16Array': TypedArrayTypeData('int'), |
| 1475 'Uint32Array': TypedArrayTypeData('int'), | 1475 'Uint32Array': TypedArrayTypeData('int'), |
| 1476 # TODO(antonm): temporary ugly hack. | 1476 # TODO(antonm): temporary ugly hack. |
| 1477 # While in transition phase we allow both DOM's ArrayBuffer | 1477 # While in transition phase we allow both DOM's ArrayBuffer |
| 1478 # and dart:typeddata's ByteBuffer for IDLs' ArrayBuffers, | 1478 # and dart:typeddata's ByteBuffer for IDLs' ArrayBuffers, |
| 1479 # hence ArrayBuffer is mapped to dynamic in arguments and return | 1479 # hence ArrayBuffer is mapped to dynamic in arguments and return |
| 1480 # values. | 1480 # values. |
| 1481 'ArrayBufferView': TypeData(clazz='Interface', dart_type='dynamic'), | 1481 'ArrayBufferView': TypeData(clazz='Interface', dart_type='dynamic', |
| 1482 'ArrayBuffer': TypeData(clazz='Interface', dart_type='dynamic'), | 1482 custom_to_native=True, custom_to_dart=True), |
| 1483 'ArrayBuffer': TypeData(clazz='Interface', dart_type='dynamic', |
| 1484 custom_to_native=True, custom_to_dart=True), |
| 1483 | 1485 |
| 1484 'SVGAngle': TypeData(clazz='SVGTearOff'), | 1486 'SVGAngle': TypeData(clazz='SVGTearOff'), |
| 1485 'SVGLength': TypeData(clazz='SVGTearOff'), | 1487 'SVGLength': TypeData(clazz='SVGTearOff'), |
| 1486 'SVGLengthList': TypeData(clazz='SVGTearOff', item_type='SVGLength'), | 1488 'SVGLengthList': TypeData(clazz='SVGTearOff', item_type='SVGLength'), |
| 1487 'SVGMatrix': TypeData(clazz='SVGTearOff'), | 1489 'SVGMatrix': TypeData(clazz='SVGTearOff'), |
| 1488 'SVGNumber': TypeData(clazz='SVGTearOff', native_type='SVGPropertyTearOff<fl
oat>'), | 1490 'SVGNumber': TypeData(clazz='SVGTearOff', native_type='SVGPropertyTearOff<fl
oat>'), |
| 1489 'SVGNumberList': TypeData(clazz='SVGTearOff', item_type='SVGNumber'), | 1491 'SVGNumberList': TypeData(clazz='SVGTearOff', item_type='SVGNumber'), |
| 1490 'SVGPathSegList': TypeData(clazz='SVGTearOff', item_type='SVGPathSeg', | 1492 'SVGPathSegList': TypeData(clazz='SVGTearOff', item_type='SVGPathSeg', |
| 1491 native_type='SVGPathSegListPropertyTearOff'), | 1493 native_type='SVGPathSegListPropertyTearOff'), |
| 1492 'SVGPoint': TypeData(clazz='SVGTearOff', native_type='SVGPropertyTearOff<Flo
atPoint>'), | 1494 'SVGPoint': TypeData(clazz='SVGTearOff', native_type='SVGPropertyTearOff<Flo
atPoint>'), |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1554 self) | 1556 self) |
| 1555 | 1557 |
| 1556 if type_data.clazz == 'SVGTearOff': | 1558 if type_data.clazz == 'SVGTearOff': |
| 1557 dart_interface_name = self._renamer.RenameInterface( | 1559 dart_interface_name = self._renamer.RenameInterface( |
| 1558 self._database.GetInterface(type_name)) | 1560 self._database.GetInterface(type_name)) |
| 1559 return SVGTearOffIDLTypeInfo( | 1561 return SVGTearOffIDLTypeInfo( |
| 1560 type_name, type_data, dart_interface_name, self) | 1562 type_name, type_data, dart_interface_name, self) |
| 1561 | 1563 |
| 1562 class_name = '%sIDLTypeInfo' % type_data.clazz | 1564 class_name = '%sIDLTypeInfo' % type_data.clazz |
| 1563 return globals()[class_name](type_name, type_data) | 1565 return globals()[class_name](type_name, type_data) |
| OLD | NEW |