| 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 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 926 native_type='unsigned'), | 926 native_type='unsigned'), |
| 927 'long': TypeData(clazz='Primitive', dart_type='int', native_type='int', | 927 'long': TypeData(clazz='Primitive', dart_type='int', native_type='int', |
| 928 webcore_getter_name='getIntegralAttribute', | 928 webcore_getter_name='getIntegralAttribute', |
| 929 webcore_setter_name='setIntegralAttribute'), | 929 webcore_setter_name='setIntegralAttribute'), |
| 930 'unsigned long': TypeData(clazz='Primitive', dart_type='int', | 930 'unsigned long': TypeData(clazz='Primitive', dart_type='int', |
| 931 native_type='unsigned', | 931 native_type='unsigned', |
| 932 webcore_getter_name='getUnsignedIntegralAttribute'
, | 932 webcore_getter_name='getUnsignedIntegralAttribute'
, |
| 933 webcore_setter_name='setUnsignedIntegralAttribute'
), | 933 webcore_setter_name='setUnsignedIntegralAttribute'
), |
| 934 'long long': TypeData(clazz='Primitive', dart_type='int'), | 934 'long long': TypeData(clazz='Primitive', dart_type='int'), |
| 935 'unsigned long long': TypeData(clazz='Primitive', dart_type='int'), | 935 'unsigned long long': TypeData(clazz='Primitive', dart_type='int'), |
| 936 'float': TypeData(clazz='Primitive', dart_type='num', native_type='double'), | 936 'float': TypeData(clazz='Primitive', dart_type='double', native_type='double
'), |
| 937 'double': TypeData(clazz='Primitive', dart_type='num'), | 937 'double': TypeData(clazz='Primitive', dart_type='double'), |
| 938 | 938 |
| 939 'any': TypeData(clazz='Primitive', dart_type='Object', native_type='ScriptVa
lue'), | 939 'any': TypeData(clazz='Primitive', dart_type='Object', native_type='ScriptVa
lue'), |
| 940 'Array': TypeData(clazz='Primitive', dart_type='List'), | 940 'Array': TypeData(clazz='Primitive', dart_type='List'), |
| 941 'custom': TypeData(clazz='Primitive', dart_type='dynamic'), | 941 'custom': TypeData(clazz='Primitive', dart_type='dynamic'), |
| 942 'ClientRect': TypeData(clazz='Interface', | 942 'ClientRect': TypeData(clazz='Interface', |
| 943 dart_type='Rect', suppress_interface=True), | 943 dart_type='Rect', suppress_interface=True), |
| 944 'Date': TypeData(clazz='Primitive', dart_type='DateTime', native_type='doubl
e'), | 944 'Date': TypeData(clazz='Primitive', dart_type='DateTime', native_type='doubl
e'), |
| 945 'DOMObject': TypeData(clazz='Primitive', dart_type='Object', native_type='Sc
riptValue'), | 945 'DOMObject': TypeData(clazz='Primitive', dart_type='Object', native_type='Sc
riptValue'), |
| 946 'DOMString': TypeData(clazz='Primitive', dart_type='String', native_type='St
ring'), | 946 'DOMString': TypeData(clazz='Primitive', dart_type='String', native_type='St
ring'), |
| 947 # TODO(vsm): This won't actually work until we convert the Map to | 947 # TODO(vsm): This won't actually work until we convert the Map to |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1115 type_name, type_data, dart_interface_name, self) | 1115 type_name, type_data, dart_interface_name, self) |
| 1116 | 1116 |
| 1117 if type_data.clazz == 'BasicTypedList': | 1117 if type_data.clazz == 'BasicTypedList': |
| 1118 dart_interface_name = self._renamer.RenameInterface( | 1118 dart_interface_name = self._renamer.RenameInterface( |
| 1119 self._database.GetInterface(type_name)) | 1119 self._database.GetInterface(type_name)) |
| 1120 return BasicTypedListIDLTypeInfo( | 1120 return BasicTypedListIDLTypeInfo( |
| 1121 type_name, type_data, dart_interface_name, self) | 1121 type_name, type_data, dart_interface_name, self) |
| 1122 | 1122 |
| 1123 class_name = '%sIDLTypeInfo' % type_data.clazz | 1123 class_name = '%sIDLTypeInfo' % type_data.clazz |
| 1124 return globals()[class_name](type_name, type_data) | 1124 return globals()[class_name](type_name, type_data) |
| OLD | NEW |