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 hit_tests_mojom; | 5 library hit_tests_mojom; |
6 import 'dart:async'; | 6 import 'dart:async'; |
7 import 'package:mojo/bindings.dart' as bindings; | 7 import 'package:mojo/bindings.dart' as bindings; |
8 import 'package:mojo/core.dart' as core; | 8 import 'package:mojo/core.dart' as core; |
9 import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as servic
e_describer; | 9 import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as servic
e_describer; |
10 import 'package:mojo_services/mojo/geometry.mojom.dart' as geometry_mojom; | 10 import 'package:mojo_services/mojo/geometry.mojom.dart' as geometry_mojom; |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 case invisible: | 64 case invisible: |
65 return 'HitTestBehaviorVisibility.invisible'; | 65 return 'HitTestBehaviorVisibility.invisible'; |
66 default: | 66 default: |
67 return null; | 67 return null; |
68 } | 68 } |
69 } | 69 } |
70 | 70 |
71 int toJson() => mojoEnumValue; | 71 int toJson() => mojoEnumValue; |
72 } | 72 } |
73 | 73 |
74 | |
75 | |
76 class HitTestBehavior extends bindings.Struct { | 74 class HitTestBehavior extends bindings.Struct { |
77 static const List<bindings.StructDataHeader> kVersions = const [ | 75 static const List<bindings.StructDataHeader> kVersions = const [ |
78 const bindings.StructDataHeader(24, 0) | 76 const bindings.StructDataHeader(24, 0) |
79 ]; | 77 ]; |
80 HitTestBehaviorVisibility visibility = new HitTestBehaviorVisibility(0); | 78 HitTestBehaviorVisibility visibility = new HitTestBehaviorVisibility(0); |
81 bool prune = false; | 79 bool prune = false; |
82 geometry_mojom.Rect hitRect = null; | 80 geometry_mojom.Rect hitRect = null; |
83 | 81 |
84 HitTestBehavior() : super(kVersions.last.size); | 82 HitTestBehavior() : super(kVersions.last.size); |
85 | 83 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 Map toJson() { | 169 Map toJson() { |
172 Map map = new Map(); | 170 Map map = new Map(); |
173 map["visibility"] = visibility; | 171 map["visibility"] = visibility; |
174 map["prune"] = prune; | 172 map["prune"] = prune; |
175 map["hitRect"] = hitRect; | 173 map["hitRect"] = hitRect; |
176 return map; | 174 return map; |
177 } | 175 } |
178 } | 176 } |
179 | 177 |
180 | 178 |
181 | |
182 | |
183 class HitTestResult extends bindings.Struct { | 179 class HitTestResult extends bindings.Struct { |
184 static const List<bindings.StructDataHeader> kVersions = const [ | 180 static const List<bindings.StructDataHeader> kVersions = const [ |
185 const bindings.StructDataHeader(16, 0) | 181 const bindings.StructDataHeader(16, 0) |
186 ]; | 182 ]; |
187 SceneHit root = null; | 183 SceneHit root = null; |
188 | 184 |
189 HitTestResult() : super(kVersions.last.size); | 185 HitTestResult() : super(kVersions.last.size); |
190 | 186 |
191 static HitTestResult deserialize(bindings.Message message) { | 187 static HitTestResult deserialize(bindings.Message message) { |
192 var decoder = new bindings.Decoder(message); | 188 var decoder = new bindings.Decoder(message); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 } | 242 } |
247 | 243 |
248 Map toJson() { | 244 Map toJson() { |
249 Map map = new Map(); | 245 Map map = new Map(); |
250 map["root"] = root; | 246 map["root"] = root; |
251 return map; | 247 return map; |
252 } | 248 } |
253 } | 249 } |
254 | 250 |
255 | 251 |
256 | |
257 | |
258 class SceneHit extends bindings.Struct { | 252 class SceneHit extends bindings.Struct { |
259 static const List<bindings.StructDataHeader> kVersions = const [ | 253 static const List<bindings.StructDataHeader> kVersions = const [ |
260 const bindings.StructDataHeader(32, 0) | 254 const bindings.StructDataHeader(32, 0) |
261 ]; | 255 ]; |
262 scene_token_mojom.SceneToken sceneToken = null; | 256 scene_token_mojom.SceneToken sceneToken = null; |
263 int sceneVersion = 0; | 257 int sceneVersion = 0; |
264 List<Hit> hits = null; | 258 List<Hit> hits = null; |
265 | 259 |
266 SceneHit() : super(kVersions.last.size); | 260 SceneHit() : super(kVersions.last.size); |
267 | 261 |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 Map toJson() { | 362 Map toJson() { |
369 Map map = new Map(); | 363 Map map = new Map(); |
370 map["sceneToken"] = sceneToken; | 364 map["sceneToken"] = sceneToken; |
371 map["sceneVersion"] = sceneVersion; | 365 map["sceneVersion"] = sceneVersion; |
372 map["hits"] = hits; | 366 map["hits"] = hits; |
373 return map; | 367 return map; |
374 } | 368 } |
375 } | 369 } |
376 | 370 |
377 | 371 |
378 | |
379 | |
380 class NodeHit extends bindings.Struct { | 372 class NodeHit extends bindings.Struct { |
381 static const List<bindings.StructDataHeader> kVersions = const [ | 373 static const List<bindings.StructDataHeader> kVersions = const [ |
382 const bindings.StructDataHeader(24, 0) | 374 const bindings.StructDataHeader(24, 0) |
383 ]; | 375 ]; |
384 int nodeId = 0; | 376 int nodeId = 0; |
385 geometry_mojom.Point intersection = null; | 377 geometry_mojom.Point intersection = null; |
386 | 378 |
387 NodeHit() : super(kVersions.last.size); | 379 NodeHit() : super(kVersions.last.size); |
388 | 380 |
389 static NodeHit deserialize(bindings.Message message) { | 381 static NodeHit deserialize(bindings.Message message) { |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 | 449 |
458 Map toJson() { | 450 Map toJson() { |
459 Map map = new Map(); | 451 Map map = new Map(); |
460 map["nodeId"] = nodeId; | 452 map["nodeId"] = nodeId; |
461 map["intersection"] = intersection; | 453 map["intersection"] = intersection; |
462 return map; | 454 return map; |
463 } | 455 } |
464 } | 456 } |
465 | 457 |
466 | 458 |
467 | |
468 | |
469 class _HitTesterHitTestParams extends bindings.Struct { | 459 class _HitTesterHitTestParams extends bindings.Struct { |
470 static const List<bindings.StructDataHeader> kVersions = const [ | 460 static const List<bindings.StructDataHeader> kVersions = const [ |
471 const bindings.StructDataHeader(16, 0) | 461 const bindings.StructDataHeader(16, 0) |
472 ]; | 462 ]; |
473 geometry_mojom.Point point = null; | 463 geometry_mojom.Point point = null; |
474 | 464 |
475 _HitTesterHitTestParams() : super(kVersions.last.size); | 465 _HitTesterHitTestParams() : super(kVersions.last.size); |
476 | 466 |
477 static _HitTesterHitTestParams deserialize(bindings.Message message) { | 467 static _HitTesterHitTestParams deserialize(bindings.Message message) { |
478 var decoder = new bindings.Decoder(message); | 468 var decoder = new bindings.Decoder(message); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
532 } | 522 } |
533 | 523 |
534 Map toJson() { | 524 Map toJson() { |
535 Map map = new Map(); | 525 Map map = new Map(); |
536 map["point"] = point; | 526 map["point"] = point; |
537 return map; | 527 return map; |
538 } | 528 } |
539 } | 529 } |
540 | 530 |
541 | 531 |
542 | |
543 | |
544 class HitTesterHitTestResponseParams extends bindings.Struct { | 532 class HitTesterHitTestResponseParams extends bindings.Struct { |
545 static const List<bindings.StructDataHeader> kVersions = const [ | 533 static const List<bindings.StructDataHeader> kVersions = const [ |
546 const bindings.StructDataHeader(16, 0) | 534 const bindings.StructDataHeader(16, 0) |
547 ]; | 535 ]; |
548 HitTestResult result = null; | 536 HitTestResult result = null; |
549 | 537 |
550 HitTesterHitTestResponseParams() : super(kVersions.last.size); | 538 HitTesterHitTestResponseParams() : super(kVersions.last.size); |
551 | 539 |
552 static HitTesterHitTestResponseParams deserialize(bindings.Message message) { | 540 static HitTesterHitTestResponseParams deserialize(bindings.Message message) { |
553 var decoder = new bindings.Decoder(message); | 541 var decoder = new bindings.Decoder(message); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 | 596 |
609 Map toJson() { | 597 Map toJson() { |
610 Map map = new Map(); | 598 Map map = new Map(); |
611 map["result"] = result; | 599 map["result"] = result; |
612 return map; | 600 return map; |
613 } | 601 } |
614 } | 602 } |
615 | 603 |
616 | 604 |
617 | 605 |
618 | |
619 | |
620 enum HitTag { | 606 enum HitTag { |
621 scene, | 607 scene, |
622 node, | 608 node, |
623 unknown | 609 unknown |
624 } | 610 } |
625 | 611 |
626 class Hit extends bindings.Union { | 612 class Hit extends bindings.Union { |
627 static final _tag_to_int = const { | 613 static final _tag_to_int = const { |
628 HitTag.scene: 0, | 614 HitTag.scene: 0, |
629 HitTag.node: 1, | 615 HitTag.node: 1, |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
713 case HitTag.node: | 699 case HitTag.node: |
714 result += "node"; | 700 result += "node"; |
715 break; | 701 break; |
716 default: | 702 default: |
717 result += "unknown"; | 703 result += "unknown"; |
718 } | 704 } |
719 result += ": $_data)"; | 705 result += ": $_data)"; |
720 return result; | 706 return result; |
721 } | 707 } |
722 } | 708 } |
723 | |
724 | |
725 | |
726 const int _HitTester_hitTestName = 0; | 709 const int _HitTester_hitTestName = 0; |
727 | 710 |
728 | |
729 | |
730 class _HitTesterServiceDescription implements service_describer.ServiceDescripti
on { | 711 class _HitTesterServiceDescription implements service_describer.ServiceDescripti
on { |
731 dynamic getTopLevelInterface([Function responseFactory]) => | 712 dynamic getTopLevelInterface([Function responseFactory]) => |
732 responseFactory(null); | 713 responseFactory(null); |
733 | 714 |
734 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 715 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => |
735 responseFactory(null); | 716 responseFactory(null); |
736 | 717 |
737 dynamic getAllTypeDefinitions([Function responseFactory]) => | 718 dynamic getAllTypeDefinitions([Function responseFactory]) => |
738 responseFactory(null); | 719 responseFactory(null); |
739 } | 720 } |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
952 static service_describer.ServiceDescription get serviceDescription { | 933 static service_describer.ServiceDescription get serviceDescription { |
953 if (_cachedServiceDescription == null) { | 934 if (_cachedServiceDescription == null) { |
954 _cachedServiceDescription = new _HitTesterServiceDescription(); | 935 _cachedServiceDescription = new _HitTesterServiceDescription(); |
955 } | 936 } |
956 return _cachedServiceDescription; | 937 return _cachedServiceDescription; |
957 } | 938 } |
958 } | 939 } |
959 | 940 |
960 | 941 |
961 | 942 |
OLD | NEW |