| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * Wraps a callback with translations of mouse events to touch events. Use | 6 * Wraps a callback with translations of mouse events to touch events. Use |
| 7 * this function to invoke your callback that expects touch events after | 7 * this function to invoke your callback that expects touch events after |
| 8 * touch events are created from the actual mouse events. | 8 * touch events are created from the actual mouse events. |
| 9 */ | 9 */ |
| 10 EventListener mouseToTouchCallback(EventListener callback) { | 10 EventListener mouseToTouchCallback(EventListener callback) { |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 int get pageX => wrapped.pageX; | 159 int get pageX => wrapped.pageX; |
| 160 | 160 |
| 161 int get pageY => wrapped.pageY; | 161 int get pageY => wrapped.pageY; |
| 162 | 162 |
| 163 int get screenX => wrapped.screenX; | 163 int get screenX => wrapped.screenX; |
| 164 | 164 |
| 165 int get screenY {return wrapped.screenY; } | 165 int get screenY {return wrapped.screenY; } |
| 166 | 166 |
| 167 EventTarget get target => wrapped.target; | 167 EventTarget get target => wrapped.target; |
| 168 | 168 |
| 169 num get webkitForce { throw new NotImplementedException(); } | 169 num get webkitForce { throw new UnimplementedError(); } |
| 170 int get webkitRadiusX { throw new NotImplementedException(); } | 170 int get webkitRadiusX { throw new UnimplementedError(); } |
| 171 int get webkitRadiusY { throw new NotImplementedException(); } | 171 int get webkitRadiusY { throw new UnimplementedError(); } |
| 172 num get webkitRotationAngle { throw new NotImplementedException(); } | 172 num get webkitRotationAngle { throw new UnimplementedError(); } |
| 173 } | 173 } |
| 174 | 174 |
| 175 class MockTouchEvent implements TouchEvent { | 175 class MockTouchEvent implements TouchEvent { |
| 176 MouseEvent wrapped; | 176 MouseEvent wrapped; |
| 177 // TODO(jacobr): these are currently Lists instead of a TouchList. | 177 // TODO(jacobr): these are currently Lists instead of a TouchList. |
| 178 final List<Touch> touches; | 178 final List<Touch> touches; |
| 179 final List<Touch> targetTouches; | 179 final List<Touch> targetTouches; |
| 180 final List<Touch> changedTouches; | 180 final List<Touch> changedTouches; |
| 181 MockTouchEvent(MouseEvent this.wrapped, List<Touch> this.touches, | 181 MockTouchEvent(MouseEvent this.wrapped, List<Touch> this.touches, |
| 182 List<Touch> this.targetTouches, | 182 List<Touch> this.targetTouches, |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 int get which => wrapped.which; | 233 int get which => wrapped.which; |
| 234 | 234 |
| 235 bool get altKey => wrapped.altKey; | 235 bool get altKey => wrapped.altKey; |
| 236 | 236 |
| 237 bool get ctrlKey => wrapped.ctrlKey; | 237 bool get ctrlKey => wrapped.ctrlKey; |
| 238 | 238 |
| 239 bool get metaKey => wrapped.metaKey; | 239 bool get metaKey => wrapped.metaKey; |
| 240 | 240 |
| 241 bool get shiftKey => wrapped.shiftKey; | 241 bool get shiftKey => wrapped.shiftKey; |
| 242 } | 242 } |
| OLD | NEW |