OLD | NEW |
1 // WARNING: DO NOT EDIT. This file was generated by a program. | 1 // WARNING: DO NOT EDIT. This file was generated by a program. |
2 // See $MOJO_SDK/tools/bindings/mojom_bindings_generator.py. | 2 // See $MOJO_SDK/tools/bindings/mojom_bindings_generator.py. |
3 | 3 |
4 library sample_import2_mojom; | 4 library sample_import2_mojom; |
5 import 'dart:collection'; | 5 import 'dart:collection'; |
6 import 'dart:convert'; | 6 import 'dart:convert'; |
7 import 'dart:io'; | 7 import 'dart:io'; |
8 import 'dart:typed_data'; | 8 import 'dart:typed_data'; |
9 import 'package:mojo/bindings.dart' as bindings; | 9 import 'package:mojo/bindings.dart' as bindings; |
10 import 'package:mojo/mojo/bindings/types/mojom_types.mojom.dart' as mojom_types; | 10 import 'package:mojo/mojo/bindings/types/mojom_types.mojom.dart' as mojom_types; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 | 67 |
68 class Size extends bindings.Struct { | 68 class Size extends bindings.Struct { |
69 static const List<bindings.StructDataHeader> kVersions = const [ | 69 static const List<bindings.StructDataHeader> kVersions = const [ |
70 const bindings.StructDataHeader(16, 0) | 70 const bindings.StructDataHeader(16, 0) |
71 ]; | 71 ]; |
72 int width = 0; | 72 int width = 0; |
73 int height = 0; | 73 int height = 0; |
74 | 74 |
75 Size() : super(kVersions.last.size); | 75 Size() : super(kVersions.last.size); |
76 | 76 |
| 77 Size.init( |
| 78 int this.width, |
| 79 int this.height |
| 80 ) : super(kVersions.last.size); |
| 81 |
77 static Size deserialize(bindings.Message message) { | 82 static Size deserialize(bindings.Message message) { |
78 var decoder = new bindings.Decoder(message); | 83 var decoder = new bindings.Decoder(message); |
79 var result = decode(decoder); | 84 var result = decode(decoder); |
80 if (decoder.excessHandles != null) { | 85 if (decoder.excessHandles != null) { |
81 decoder.excessHandles.forEach((h) => h.close()); | 86 decoder.excessHandles.forEach((h) => h.close()); |
82 } | 87 } |
83 return result; | 88 return result; |
84 } | 89 } |
85 | 90 |
86 static Size decode(bindings.Decoder decoder0) { | 91 static Size decode(bindings.Decoder decoder0) { |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 static const List<bindings.StructDataHeader> kVersions = const [ | 160 static const List<bindings.StructDataHeader> kVersions = const [ |
156 const bindings.StructDataHeader(32, 0) | 161 const bindings.StructDataHeader(32, 0) |
157 ]; | 162 ]; |
158 sample_import_mojom.Shape shape = new sample_import_mojom.Shape(1); | 163 sample_import_mojom.Shape shape = new sample_import_mojom.Shape(1); |
159 Color color = new Color(1); | 164 Color color = new Color(1); |
160 sample_import_mojom.Point location = null; | 165 sample_import_mojom.Point location = null; |
161 Size size = null; | 166 Size size = null; |
162 | 167 |
163 Thing() : super(kVersions.last.size); | 168 Thing() : super(kVersions.last.size); |
164 | 169 |
| 170 Thing.init( |
| 171 sample_import_mojom.Shape this.shape, |
| 172 Color this.color, |
| 173 sample_import_mojom.Point this.location, |
| 174 Size this.size |
| 175 ) : super(kVersions.last.size); |
| 176 |
165 static Thing deserialize(bindings.Message message) { | 177 static Thing deserialize(bindings.Message message) { |
166 var decoder = new bindings.Decoder(message); | 178 var decoder = new bindings.Decoder(message); |
167 var result = decode(decoder); | 179 var result = decode(decoder); |
168 if (decoder.excessHandles != null) { | 180 if (decoder.excessHandles != null) { |
169 decoder.excessHandles.forEach((h) => h.close()); | 181 decoder.excessHandles.forEach((h) => h.close()); |
170 } | 182 } |
171 return result; | 183 return result; |
172 } | 184 } |
173 | 185 |
174 static Thing decode(bindings.Decoder decoder0) { | 186 static Thing decode(bindings.Decoder decoder0) { |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 | 292 |
281 Map<String, mojom_types.UserDefinedType> getAllMojomTypeDefinitions() { | 293 Map<String, mojom_types.UserDefinedType> getAllMojomTypeDefinitions() { |
282 return getRuntimeTypeInfo().typeMap; | 294 return getRuntimeTypeInfo().typeMap; |
283 } | 295 } |
284 | 296 |
285 var _runtimeTypeInfo; | 297 var _runtimeTypeInfo; |
286 mojom_types.RuntimeTypeInfo _initRuntimeTypeInfo() { | 298 mojom_types.RuntimeTypeInfo _initRuntimeTypeInfo() { |
287 // serializedRuntimeTypeInfo contains the bytes of the Mojo serialization of | 299 // serializedRuntimeTypeInfo contains the bytes of the Mojo serialization of |
288 // a mojom_types.RuntimeTypeInfo struct describing the Mojom types in this | 300 // a mojom_types.RuntimeTypeInfo struct describing the Mojom types in this |
289 // file. The string contains the base64 encoding of the gzip-compressed bytes. | 301 // file. The string contains the base64 encoding of the gzip-compressed bytes. |
290 var serializedRuntimeTypeInfo = "H4sIAAAJbogC/8yXzW7TQBCA101CgwolQKGhIMixp7jiF
HGihIhIrVBFcqk4VKmz1Itib2S7QuIJ+gg8HsceeQNYZ2fAGXvtNEpMVxpNnbV3d77Z+WmT6dEAfQCa/
o66TjR97wp0S0klMY/r9kG/UrKrZHh60js76p2+Ed5UBhEft7tyIgP2Us09zZwfiO887/uhK/wL1oH98
Vz7iXNa8Tkq889Xd7LtuQb9ls0PtKcD+jcM+h6O+0pqSrR12rZtJcTs1P743WclAyW2Kz1uB5dj6QmfB
7Ynv0o7DBz9x/TyfCIcW/gRD76MHB7a58IfKx6hHfEwCu1w5E0n/Ezv+rodf+T9tXsjsW/TmufWYvljU
T59w/db4K9Pvfez5z0lj1J82jid4rQN5183pyIe1op4oN/fHR92j5R+oWQnzQOnUzwelMSjRfLALzxHZ
TVxc09JNbZhFvWMPQE2JB2k7I/vzuZ/iJuGNW93h5yrxhYbJm4swS15H03355sYR24Gn8eQw9fN56Ycq
ktwsHI4xHkhTu0uFxdulOawUxIHrDO0bjJyf0zx1N9cbR3SVTKjDsEE5bRbUjztwx1ADj8hnn5APrmum
uOrlsw/OG+tN75CdzTNyj/x88MS8y8j++PvKf8O9IHN/ZN+oQH3sm64l5RLbOvdWf3uDg8/fjjuFfZ5e
p9F/XhgrSc/oB8d6MuoH5+VlB9Mfmwa+sei/nlR/1mJerCF6/9rKwr3KfIfHfUl/LeR478GrDmRzigS0
qf+27tl/juRavFcrvqNm3JtLMG1ksMV+64Q+i7K9XlJ9aCIK+0Pi/5vzKvDybrzJwAA//8GIg9dGA8AA
A=="; | 302 var serializedRuntimeTypeInfo = "H4sIAAAJbogC/8yXzW7TQBCA13VDgwolQKGhIMixpyzqK
eLUEiIqtUIVzaWn4DrGXmRnLa8rpD4Bj8Ij8EgcOXKDdXZW2OO/NEpdVhpNnbX355vfdokaHdCvQePft
W4jjd/7BronxUzN63WPQL+SsiNlfH46mhyPzt+wIORR7Ez7Q+7ziLyUc08L58/YlVP1/dhjM5cMYH99r
r3UOQ0pn8zs8487xff5BfqAZIe+zwD0Hxj4PT3uS2lJUbdTd9uSgq6d219/50qZSKGXIqI+ty2fupy7v
kM9Hjj0KrJowL/wfSoie/4XDS8vfGZTNoud6LNlO4JesNlUshE0dkQsqLCC0Hcm6gT7/eSjYL7/Wmr/n
pHl1yPVY1FORyXfb4LdPo7ezZ93pTzKcerr6RyvLTh/U7zquBgr4qL94O3J4fBY6hdStvNc9HSOy4OGu
fRQfvit49BcTTzdk7IuRWUDQp4AI5QmchwSX9q4xXjqGtn7D9D5WmSxUcaPpPil47bMn76yaewVcHoMO
b4pTtflsb4ED6OCR5I3khLgOcz14jyP7YZ56LqE6yzB+bkkzsKN1dYtVVUL6hZMYF47DcfZHviE5vET4
uy7mXWkIj9rpbjp8x8YNxt3wrPCovyUPD+8hTxN0Dn07zl7n6mDl/df6oUO+Gm7xE8xn+TOd+d1fzg+/
PD+ZFTbJ6p9FrXnwLiZvKHtaUNfh+35rOG8UWbPbkkfWteHL2pHI1U3NvX6/9qR2n3q7IhHewk7rlXYs
QNrJqaJGZ9hO+7+p3Y85XLhSr7qjevy7SzB16zgq/s1Af0a5vu84XpRxxf3l3X/j1bV63Rd+hsAAP//s
/jsknAPAAA="; |
291 | 303 |
292 // Deserialize RuntimeTypeInfo | 304 // Deserialize RuntimeTypeInfo |
293 var bytes = BASE64.decode(serializedRuntimeTypeInfo); | 305 var bytes = BASE64.decode(serializedRuntimeTypeInfo); |
294 var unzippedBytes = new ZLibDecoder().convert(bytes); | 306 var unzippedBytes = new ZLibDecoder().convert(bytes); |
295 var bdata = new ByteData.view(unzippedBytes.buffer); | 307 var bdata = new ByteData.view(unzippedBytes.buffer); |
296 var message = new bindings.Message(bdata, null, unzippedBytes.length, 0); | 308 var message = new bindings.Message(bdata, null, unzippedBytes.length, 0); |
297 _runtimeTypeInfo = mojom_types.RuntimeTypeInfo.deserialize(message); | 309 _runtimeTypeInfo = mojom_types.RuntimeTypeInfo.deserialize(message); |
298 sample_import_mojom.getAllMojomTypeDefinitions() | 310 sample_import_mojom.getAllMojomTypeDefinitions() |
299 .forEach((String s, mojom_types.UserDefinedType udt) { | 311 .forEach((String s, mojom_types.UserDefinedType udt) { |
300 _runtimeTypeInfo.typeMap[s] = udt; | 312 _runtimeTypeInfo.typeMap[s] = udt; |
301 }); | 313 }); |
302 | 314 |
303 return _runtimeTypeInfo; | 315 return _runtimeTypeInfo; |
304 } | 316 } |
OLD | NEW |