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 1291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1302 'PluginArray': TypeData(clazz='Interface', item_type='Plugin'), | 1302 'PluginArray': TypeData(clazz='Interface', item_type='Plugin'), |
1303 'DOMStringList': TypeData(clazz='Interface', item_type='DOMString', | 1303 'DOMStringList': TypeData(clazz='Interface', item_type='DOMString', |
1304 dart_type='List<String>', custom_to_native=True), | 1304 dart_type='List<String>', custom_to_native=True), |
1305 'FileList': TypeData(clazz='Interface', item_type='File', | 1305 'FileList': TypeData(clazz='Interface', item_type='File', |
1306 dart_type='List<File>'), | 1306 dart_type='List<File>'), |
1307 'Future': TypeData(clazz='Interface', dart_type='Future'), | 1307 'Future': TypeData(clazz='Interface', dart_type='Future'), |
1308 'GamepadList': TypeData(clazz='Interface', item_type='Gamepad', | 1308 'GamepadList': TypeData(clazz='Interface', item_type='Gamepad', |
1309 suppress_interface=True), | 1309 suppress_interface=True), |
1310 'GLenum': TypeData(clazz='Primitive', dart_type='int', | 1310 'GLenum': TypeData(clazz='Primitive', dart_type='int', |
1311 native_type='unsigned'), | 1311 native_type='unsigned'), |
| 1312 'GLboolean': TypeData(clazz='Primitive', dart_type='bool', |
| 1313 native_type='bool'), |
| 1314 'GLbitfield': TypeData(clazz='Primitive', dart_type='int', |
| 1315 native_type='unsigned'), |
| 1316 'GLshort': TypeData(clazz='Primitive', dart_type='int', native_type='short')
, |
| 1317 'GLint': TypeData(clazz='Primitive', dart_type='int', |
| 1318 native_type='long'), |
| 1319 'GLsizei': TypeData(clazz='Primitive', dart_type='int', |
| 1320 native_type='long'), |
| 1321 'GLintptr': TypeData(clazz='Primitive', dart_type='int'), |
| 1322 'GLsizeiptr': TypeData(clazz='Primitive', dart_type='int'), |
| 1323 'GLushort': TypeData(clazz='Primitive', dart_type='int', native_type='int'), |
| 1324 'GLuint': TypeData(clazz='Primitive', dart_type='int', |
| 1325 native_type='unsigned'), |
| 1326 'GLfloat': TypeData(clazz='Primitive', dart_type='num', native_type='float')
, |
| 1327 'GLclampf': TypeData(clazz='Primitive', dart_type='num', native_type='float'
), |
1312 'HTMLCollection': TypeData(clazz='Interface', item_type='Node', | 1328 'HTMLCollection': TypeData(clazz='Interface', item_type='Node', |
1313 dart_type='List<Node>'), | 1329 dart_type='List<Node>'), |
1314 'NamedNodeMap': TypeData(clazz='Interface', item_type='Node'), | 1330 'NamedNodeMap': TypeData(clazz='Interface', item_type='Node'), |
1315 'NodeList': TypeData(clazz='Interface', item_type='Node', | 1331 'NodeList': TypeData(clazz='Interface', item_type='Node', |
1316 suppress_interface=False, dart_type='List<Node>'), | 1332 suppress_interface=False, dart_type='List<Node>'), |
1317 'SVGElementInstanceList': TypeData(clazz='Interface', | 1333 'SVGElementInstanceList': TypeData(clazz='Interface', |
1318 item_type='SVGElementInstance', suppress_interface=True), | 1334 item_type='SVGElementInstance', suppress_interface=True), |
1319 'SourceBufferList': TypeData(clazz='Interface', item_type='SourceBuffer'), | 1335 'SourceBufferList': TypeData(clazz='Interface', item_type='SourceBuffer'), |
1320 'SpeechGrammarList': TypeData(clazz='Interface', item_type='SpeechGrammar'), | 1336 'SpeechGrammarList': TypeData(clazz='Interface', item_type='SpeechGrammar'), |
1321 'SpeechInputResultList': TypeData(clazz='Interface', | 1337 'SpeechInputResultList': TypeData(clazz='Interface', |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1502 return_type == 'Rectangle') | 1518 return_type == 'Rectangle') |
1503 | 1519 |
1504 def wrap_return_type_blink(return_type, type_name, type_registry): | 1520 def wrap_return_type_blink(return_type, type_name, type_registry): |
1505 """Returns True if we should wrap the returned value. This checks | 1521 """Returns True if we should wrap the returned value. This checks |
1506 a number of different variations, calling the more basic functions | 1522 a number of different variations, calling the more basic functions |
1507 above.""" | 1523 above.""" |
1508 return (wrap_unwrap_type_blink(return_type, type_registry) or | 1524 return (wrap_unwrap_type_blink(return_type, type_registry) or |
1509 wrap_unwrap_type_blink(type_name, type_registry) or | 1525 wrap_unwrap_type_blink(type_name, type_registry) or |
1510 wrap_type_blink(return_type, type_registry) or | 1526 wrap_type_blink(return_type, type_registry) or |
1511 wrap_unwrap_list_blink(return_type, type_registry)) | 1527 wrap_unwrap_list_blink(return_type, type_registry)) |
OLD | NEW |