Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(621)

Side by Side Diff: mojo/dart/packages/mojo_services/lib/mojo/geometry.mojom.dart

Issue 1539673003: Generate Mojom Types in Dart (Take 2) (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Merge with master Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:mojo/bindings.dart' as bindings; 9 import 'package:mojo/bindings.dart' as bindings;
10 import 'package:mojo/core.dart' as core; 10 import 'package:mojo/core.dart' as core;
11 import 'package:mojo/mojo/bindings/types/mojom_types.mojom.dart' as mojom_types;
11 12
12 13
13 14
15
14 class Point extends bindings.Struct { 16 class Point extends bindings.Struct {
15 static const List<bindings.StructDataHeader> kVersions = const [ 17 static const List<bindings.StructDataHeader> kVersions = const [
16 const bindings.StructDataHeader(16, 0) 18 const bindings.StructDataHeader(16, 0)
17 ]; 19 ];
18 int x = 0; 20 int x = 0;
19 int y = 0; 21 int y = 0;
20 22
21 Point() : super(kVersions.last.size); 23 Point() : super(kVersions.last.size);
22 24
23 static Point deserialize(bindings.Message message) { 25 static Point deserialize(bindings.Message message) {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 82
81 Map toJson() { 83 Map toJson() {
82 Map map = new Map(); 84 Map map = new Map();
83 map["x"] = x; 85 map["x"] = x;
84 map["y"] = y; 86 map["y"] = y;
85 return map; 87 return map;
86 } 88 }
87 } 89 }
88 90
89 91
92
93
90 class PointF extends bindings.Struct { 94 class PointF extends bindings.Struct {
91 static const List<bindings.StructDataHeader> kVersions = const [ 95 static const List<bindings.StructDataHeader> kVersions = const [
92 const bindings.StructDataHeader(16, 0) 96 const bindings.StructDataHeader(16, 0)
93 ]; 97 ];
94 double x = 0.0; 98 double x = 0.0;
95 double y = 0.0; 99 double y = 0.0;
96 100
97 PointF() : super(kVersions.last.size); 101 PointF() : super(kVersions.last.size);
98 102
99 static PointF deserialize(bindings.Message message) { 103 static PointF deserialize(bindings.Message message) {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 160
157 Map toJson() { 161 Map toJson() {
158 Map map = new Map(); 162 Map map = new Map();
159 map["x"] = x; 163 map["x"] = x;
160 map["y"] = y; 164 map["y"] = y;
161 return map; 165 return map;
162 } 166 }
163 } 167 }
164 168
165 169
170
171
166 class Size extends bindings.Struct { 172 class Size extends bindings.Struct {
167 static const List<bindings.StructDataHeader> kVersions = const [ 173 static const List<bindings.StructDataHeader> kVersions = const [
168 const bindings.StructDataHeader(16, 0) 174 const bindings.StructDataHeader(16, 0)
169 ]; 175 ];
170 int width = 0; 176 int width = 0;
171 int height = 0; 177 int height = 0;
172 178
173 Size() : super(kVersions.last.size); 179 Size() : super(kVersions.last.size);
174 180
175 static Size deserialize(bindings.Message message) { 181 static Size deserialize(bindings.Message message) {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 238
233 Map toJson() { 239 Map toJson() {
234 Map map = new Map(); 240 Map map = new Map();
235 map["width"] = width; 241 map["width"] = width;
236 map["height"] = height; 242 map["height"] = height;
237 return map; 243 return map;
238 } 244 }
239 } 245 }
240 246
241 247
248
249
242 class Rect extends bindings.Struct { 250 class Rect extends bindings.Struct {
243 static const List<bindings.StructDataHeader> kVersions = const [ 251 static const List<bindings.StructDataHeader> kVersions = const [
244 const bindings.StructDataHeader(24, 0) 252 const bindings.StructDataHeader(24, 0)
245 ]; 253 ];
246 int x = 0; 254 int x = 0;
247 int y = 0; 255 int y = 0;
248 int width = 0; 256 int width = 0;
249 int height = 0; 257 int height = 0;
250 258
251 Rect() : super(kVersions.last.size); 259 Rect() : super(kVersions.last.size);
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 Map map = new Map(); 334 Map map = new Map();
327 map["x"] = x; 335 map["x"] = x;
328 map["y"] = y; 336 map["y"] = y;
329 map["width"] = width; 337 map["width"] = width;
330 map["height"] = height; 338 map["height"] = height;
331 return map; 339 return map;
332 } 340 }
333 } 341 }
334 342
335 343
344
345
336 class RectF extends bindings.Struct { 346 class RectF extends bindings.Struct {
337 static const List<bindings.StructDataHeader> kVersions = const [ 347 static const List<bindings.StructDataHeader> kVersions = const [
338 const bindings.StructDataHeader(24, 0) 348 const bindings.StructDataHeader(24, 0)
339 ]; 349 ];
340 double x = 0.0; 350 double x = 0.0;
341 double y = 0.0; 351 double y = 0.0;
342 double width = 0.0; 352 double width = 0.0;
343 double height = 0.0; 353 double height = 0.0;
344 354
345 RectF() : super(kVersions.last.size); 355 RectF() : super(kVersions.last.size);
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 Map map = new Map(); 430 Map map = new Map();
421 map["x"] = x; 431 map["x"] = x;
422 map["y"] = y; 432 map["y"] = y;
423 map["width"] = width; 433 map["width"] = width;
424 map["height"] = height; 434 map["height"] = height;
425 return map; 435 return map;
426 } 436 }
427 } 437 }
428 438
429 439
440
441
430 class RRect extends bindings.Struct { 442 class RRect extends bindings.Struct {
431 static const List<bindings.StructDataHeader> kVersions = const [ 443 static const List<bindings.StructDataHeader> kVersions = const [
432 const bindings.StructDataHeader(56, 0) 444 const bindings.StructDataHeader(56, 0)
433 ]; 445 ];
434 int x = 0; 446 int x = 0;
435 int y = 0; 447 int y = 0;
436 int width = 0; 448 int width = 0;
437 int height = 0; 449 int height = 0;
438 int topLeftRadiusX = 0; 450 int topLeftRadiusX = 0;
439 int topLeftRadiusY = 0; 451 int topLeftRadiusY = 0;
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 map["topRightRadiusY"] = topRightRadiusY; 598 map["topRightRadiusY"] = topRightRadiusY;
587 map["bottomLeftRadiusX"] = bottomLeftRadiusX; 599 map["bottomLeftRadiusX"] = bottomLeftRadiusX;
588 map["bottomLeftRadiusY"] = bottomLeftRadiusY; 600 map["bottomLeftRadiusY"] = bottomLeftRadiusY;
589 map["bottomRightRadiusX"] = bottomRightRadiusX; 601 map["bottomRightRadiusX"] = bottomRightRadiusX;
590 map["bottomRightRadiusY"] = bottomRightRadiusY; 602 map["bottomRightRadiusY"] = bottomRightRadiusY;
591 return map; 603 return map;
592 } 604 }
593 } 605 }
594 606
595 607
608
609
596 class Transform extends bindings.Struct { 610 class Transform extends bindings.Struct {
597 static const List<bindings.StructDataHeader> kVersions = const [ 611 static const List<bindings.StructDataHeader> kVersions = const [
598 const bindings.StructDataHeader(16, 0) 612 const bindings.StructDataHeader(16, 0)
599 ]; 613 ];
600 List<double> matrix = null; 614 List<double> matrix = null;
601 615
602 Transform() : super(kVersions.last.size); 616 Transform() : super(kVersions.last.size);
603 617
604 static Transform deserialize(bindings.Message message) { 618 static Transform deserialize(bindings.Message message) {
605 var decoder = new bindings.Decoder(message); 619 var decoder = new bindings.Decoder(message);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 } 667 }
654 668
655 Map toJson() { 669 Map toJson() {
656 Map map = new Map(); 670 Map map = new Map();
657 map["matrix"] = matrix; 671 map["matrix"] = matrix;
658 return map; 672 return map;
659 } 673 }
660 } 674 }
661 675
662 676
677
678
679
680
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698