OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 library geometry_mojom; | 5 library geometry_mojom; |
6 import 'package:mojo/bindings.dart' as bindings; | 6 import 'package:mojo/bindings.dart' as bindings; |
7 | 7 |
8 | 8 |
9 | 9 |
10 | 10 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 | 87 |
88 Map toJson() { | 88 Map toJson() { |
89 Map map = new Map(); | 89 Map map = new Map(); |
90 map["x"] = x; | 90 map["x"] = x; |
91 map["y"] = y; | 91 map["y"] = y; |
92 return map; | 92 return map; |
93 } | 93 } |
94 } | 94 } |
95 | 95 |
96 | 96 |
97 | |
98 | |
99 class PointF extends bindings.Struct { | 97 class PointF extends bindings.Struct { |
100 static const List<bindings.StructDataHeader> kVersions = const [ | 98 static const List<bindings.StructDataHeader> kVersions = const [ |
101 const bindings.StructDataHeader(16, 0) | 99 const bindings.StructDataHeader(16, 0) |
102 ]; | 100 ]; |
103 double x = 0.0; | 101 double x = 0.0; |
104 double y = 0.0; | 102 double y = 0.0; |
105 | 103 |
106 PointF() : super(kVersions.last.size); | 104 PointF() : super(kVersions.last.size); |
107 | 105 |
108 static PointF deserialize(bindings.Message message) { | 106 static PointF deserialize(bindings.Message message) { |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 | 173 |
176 Map toJson() { | 174 Map toJson() { |
177 Map map = new Map(); | 175 Map map = new Map(); |
178 map["x"] = x; | 176 map["x"] = x; |
179 map["y"] = y; | 177 map["y"] = y; |
180 return map; | 178 return map; |
181 } | 179 } |
182 } | 180 } |
183 | 181 |
184 | 182 |
185 | |
186 | |
187 class Size extends bindings.Struct { | 183 class Size extends bindings.Struct { |
188 static const List<bindings.StructDataHeader> kVersions = const [ | 184 static const List<bindings.StructDataHeader> kVersions = const [ |
189 const bindings.StructDataHeader(16, 0) | 185 const bindings.StructDataHeader(16, 0) |
190 ]; | 186 ]; |
191 int width = 0; | 187 int width = 0; |
192 int height = 0; | 188 int height = 0; |
193 | 189 |
194 Size() : super(kVersions.last.size); | 190 Size() : super(kVersions.last.size); |
195 | 191 |
196 static Size deserialize(bindings.Message message) { | 192 static Size deserialize(bindings.Message message) { |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 | 259 |
264 Map toJson() { | 260 Map toJson() { |
265 Map map = new Map(); | 261 Map map = new Map(); |
266 map["width"] = width; | 262 map["width"] = width; |
267 map["height"] = height; | 263 map["height"] = height; |
268 return map; | 264 return map; |
269 } | 265 } |
270 } | 266 } |
271 | 267 |
272 | 268 |
273 | |
274 | |
275 class Rect extends bindings.Struct { | 269 class Rect extends bindings.Struct { |
276 static const List<bindings.StructDataHeader> kVersions = const [ | 270 static const List<bindings.StructDataHeader> kVersions = const [ |
277 const bindings.StructDataHeader(24, 0) | 271 const bindings.StructDataHeader(24, 0) |
278 ]; | 272 ]; |
279 int x = 0; | 273 int x = 0; |
280 int y = 0; | 274 int y = 0; |
281 int width = 0; | 275 int width = 0; |
282 int height = 0; | 276 int height = 0; |
283 | 277 |
284 Rect() : super(kVersions.last.size); | 278 Rect() : super(kVersions.last.size); |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 Map map = new Map(); | 373 Map map = new Map(); |
380 map["x"] = x; | 374 map["x"] = x; |
381 map["y"] = y; | 375 map["y"] = y; |
382 map["width"] = width; | 376 map["width"] = width; |
383 map["height"] = height; | 377 map["height"] = height; |
384 return map; | 378 return map; |
385 } | 379 } |
386 } | 380 } |
387 | 381 |
388 | 382 |
389 | |
390 | |
391 class RectF extends bindings.Struct { | 383 class RectF extends bindings.Struct { |
392 static const List<bindings.StructDataHeader> kVersions = const [ | 384 static const List<bindings.StructDataHeader> kVersions = const [ |
393 const bindings.StructDataHeader(24, 0) | 385 const bindings.StructDataHeader(24, 0) |
394 ]; | 386 ]; |
395 double x = 0.0; | 387 double x = 0.0; |
396 double y = 0.0; | 388 double y = 0.0; |
397 double width = 0.0; | 389 double width = 0.0; |
398 double height = 0.0; | 390 double height = 0.0; |
399 | 391 |
400 RectF() : super(kVersions.last.size); | 392 RectF() : super(kVersions.last.size); |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
495 Map map = new Map(); | 487 Map map = new Map(); |
496 map["x"] = x; | 488 map["x"] = x; |
497 map["y"] = y; | 489 map["y"] = y; |
498 map["width"] = width; | 490 map["width"] = width; |
499 map["height"] = height; | 491 map["height"] = height; |
500 return map; | 492 return map; |
501 } | 493 } |
502 } | 494 } |
503 | 495 |
504 | 496 |
505 | |
506 | |
507 class RRect extends bindings.Struct { | 497 class RRect extends bindings.Struct { |
508 static const List<bindings.StructDataHeader> kVersions = const [ | 498 static const List<bindings.StructDataHeader> kVersions = const [ |
509 const bindings.StructDataHeader(56, 0) | 499 const bindings.StructDataHeader(56, 0) |
510 ]; | 500 ]; |
511 int x = 0; | 501 int x = 0; |
512 int y = 0; | 502 int y = 0; |
513 int width = 0; | 503 int width = 0; |
514 int height = 0; | 504 int height = 0; |
515 int topLeftRadiusX = 0; | 505 int topLeftRadiusX = 0; |
516 int topLeftRadiusY = 0; | 506 int topLeftRadiusY = 0; |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
723 map["topRightRadiusY"] = topRightRadiusY; | 713 map["topRightRadiusY"] = topRightRadiusY; |
724 map["bottomLeftRadiusX"] = bottomLeftRadiusX; | 714 map["bottomLeftRadiusX"] = bottomLeftRadiusX; |
725 map["bottomLeftRadiusY"] = bottomLeftRadiusY; | 715 map["bottomLeftRadiusY"] = bottomLeftRadiusY; |
726 map["bottomRightRadiusX"] = bottomRightRadiusX; | 716 map["bottomRightRadiusX"] = bottomRightRadiusX; |
727 map["bottomRightRadiusY"] = bottomRightRadiusY; | 717 map["bottomRightRadiusY"] = bottomRightRadiusY; |
728 return map; | 718 return map; |
729 } | 719 } |
730 } | 720 } |
731 | 721 |
732 | 722 |
733 | |
734 | |
735 class Transform extends bindings.Struct { | 723 class Transform extends bindings.Struct { |
736 static const List<bindings.StructDataHeader> kVersions = const [ | 724 static const List<bindings.StructDataHeader> kVersions = const [ |
737 const bindings.StructDataHeader(16, 0) | 725 const bindings.StructDataHeader(16, 0) |
738 ]; | 726 ]; |
739 List<double> matrix = null; | 727 List<double> matrix = null; |
740 | 728 |
741 Transform() : super(kVersions.last.size); | 729 Transform() : super(kVersions.last.size); |
742 | 730 |
743 static Transform deserialize(bindings.Message message) { | 731 static Transform deserialize(bindings.Message message) { |
744 var decoder = new bindings.Decoder(message); | 732 var decoder = new bindings.Decoder(message); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
798 | 786 |
799 Map toJson() { | 787 Map toJson() { |
800 Map map = new Map(); | 788 Map map = new Map(); |
801 map["matrix"] = matrix; | 789 map["matrix"] = matrix; |
802 return map; | 790 return map; |
803 } | 791 } |
804 } | 792 } |
805 | 793 |
806 | 794 |
807 | 795 |
808 | |
809 | |
810 | |
OLD | NEW |