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 view_properties_mojom; | 4 library view_properties_mojom; |
5 import 'package:mojo/bindings.dart' as bindings; | 5 import 'package:mojo/bindings.dart' as bindings; |
6 | 6 |
7 import 'package:mojo_services/mojo/geometry.mojom.dart' as geometry_mojom; | 7 import 'package:mojo_services/mojo/geometry.mojom.dart' as geometry_mojom; |
8 | 8 |
9 | 9 |
10 | 10 |
11 class ViewProperties extends bindings.Struct { | 11 class ViewProperties extends bindings.Struct { |
12 static const List<bindings.StructDataHeader> kVersions = const [ | 12 static const List<bindings.StructDataHeader> kVersions = const [ |
13 const bindings.StructDataHeader(24, 0) | 13 const bindings.StructDataHeader(24, 0) |
14 ]; | 14 ]; |
15 DisplayMetrics displayMetrics = null; | 15 DisplayMetrics displayMetrics = null; |
16 ViewLayout viewLayout = null; | 16 ViewLayout viewLayout = null; |
17 | 17 |
18 ViewProperties() : super(kVersions.last.size); | 18 ViewProperties() : super(kVersions.last.size); |
19 | 19 |
| 20 ViewProperties.init( |
| 21 DisplayMetrics this.displayMetrics, |
| 22 ViewLayout this.viewLayout |
| 23 ) : super(kVersions.last.size); |
| 24 |
20 static ViewProperties deserialize(bindings.Message message) { | 25 static ViewProperties deserialize(bindings.Message message) { |
21 var decoder = new bindings.Decoder(message); | 26 var decoder = new bindings.Decoder(message); |
22 var result = decode(decoder); | 27 var result = decode(decoder); |
23 if (decoder.excessHandles != null) { | 28 if (decoder.excessHandles != null) { |
24 decoder.excessHandles.forEach((h) => h.close()); | 29 decoder.excessHandles.forEach((h) => h.close()); |
25 } | 30 } |
26 return result; | 31 return result; |
27 } | 32 } |
28 | 33 |
29 static ViewProperties decode(bindings.Decoder decoder0) { | 34 static ViewProperties decode(bindings.Decoder decoder0) { |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 | 102 |
98 | 103 |
99 class DisplayMetrics extends bindings.Struct { | 104 class DisplayMetrics extends bindings.Struct { |
100 static const List<bindings.StructDataHeader> kVersions = const [ | 105 static const List<bindings.StructDataHeader> kVersions = const [ |
101 const bindings.StructDataHeader(16, 0) | 106 const bindings.StructDataHeader(16, 0) |
102 ]; | 107 ]; |
103 double devicePixelRatio = 1.0; | 108 double devicePixelRatio = 1.0; |
104 | 109 |
105 DisplayMetrics() : super(kVersions.last.size); | 110 DisplayMetrics() : super(kVersions.last.size); |
106 | 111 |
| 112 DisplayMetrics.init( |
| 113 double this.devicePixelRatio |
| 114 ) : super(kVersions.last.size); |
| 115 |
107 static DisplayMetrics deserialize(bindings.Message message) { | 116 static DisplayMetrics deserialize(bindings.Message message) { |
108 var decoder = new bindings.Decoder(message); | 117 var decoder = new bindings.Decoder(message); |
109 var result = decode(decoder); | 118 var result = decode(decoder); |
110 if (decoder.excessHandles != null) { | 119 if (decoder.excessHandles != null) { |
111 decoder.excessHandles.forEach((h) => h.close()); | 120 decoder.excessHandles.forEach((h) => h.close()); |
112 } | 121 } |
113 return result; | 122 return result; |
114 } | 123 } |
115 | 124 |
116 static DisplayMetrics decode(bindings.Decoder decoder0) { | 125 static DisplayMetrics decode(bindings.Decoder decoder0) { |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 | 178 |
170 | 179 |
171 class ViewLayout extends bindings.Struct { | 180 class ViewLayout extends bindings.Struct { |
172 static const List<bindings.StructDataHeader> kVersions = const [ | 181 static const List<bindings.StructDataHeader> kVersions = const [ |
173 const bindings.StructDataHeader(16, 0) | 182 const bindings.StructDataHeader(16, 0) |
174 ]; | 183 ]; |
175 geometry_mojom.Size size = null; | 184 geometry_mojom.Size size = null; |
176 | 185 |
177 ViewLayout() : super(kVersions.last.size); | 186 ViewLayout() : super(kVersions.last.size); |
178 | 187 |
| 188 ViewLayout.init( |
| 189 geometry_mojom.Size this.size |
| 190 ) : super(kVersions.last.size); |
| 191 |
179 static ViewLayout deserialize(bindings.Message message) { | 192 static ViewLayout deserialize(bindings.Message message) { |
180 var decoder = new bindings.Decoder(message); | 193 var decoder = new bindings.Decoder(message); |
181 var result = decode(decoder); | 194 var result = decode(decoder); |
182 if (decoder.excessHandles != null) { | 195 if (decoder.excessHandles != null) { |
183 decoder.excessHandles.forEach((h) => h.close()); | 196 decoder.excessHandles.forEach((h) => h.close()); |
184 } | 197 } |
185 return result; | 198 return result; |
186 } | 199 } |
187 | 200 |
188 static ViewLayout decode(bindings.Decoder decoder0) { | 201 static ViewLayout decode(bindings.Decoder decoder0) { |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 | 248 |
236 Map toJson() { | 249 Map toJson() { |
237 Map map = new Map(); | 250 Map map = new Map(); |
238 map["size"] = size; | 251 map["size"] = size; |
239 return map; | 252 return map; |
240 } | 253 } |
241 } | 254 } |
242 | 255 |
243 | 256 |
244 | 257 |
OLD | NEW |