| 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 part of touch; | 5 part of touch; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Wraps a callback with translations of mouse events to touch events. Use | 8 * Wraps a callback with translations of mouse events to touch events. Use |
| 9 * this function to invoke your callback that expects touch events after | 9 * this function to invoke your callback that expects touch events after |
| 10 * touch events are created from the actual mouse events. | 10 * touch events are created from the actual mouse events. |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 | 161 |
| 162 bool get verticalEnabled; | 162 bool get verticalEnabled; |
| 163 bool get horizontalEnabled; | 163 bool get horizontalEnabled; |
| 164 } | 164 } |
| 165 | 165 |
| 166 class MockTouch implements Touch { | 166 class MockTouch implements Touch { |
| 167 MouseEvent wrapped; | 167 MouseEvent wrapped; |
| 168 | 168 |
| 169 MockTouch(MouseEvent this.wrapped) {} | 169 MockTouch(MouseEvent this.wrapped) {} |
| 170 | 170 |
| 171 int get clientX => wrapped.clientX; | 171 int get clientX => wrapped.client.x; |
| 172 | 172 |
| 173 int get clientY => wrapped.clientY; | 173 int get clientY => wrapped.client.y; |
| 174 | 174 |
| 175 int get identifier => 0; | 175 int get identifier => 0; |
| 176 | 176 |
| 177 int get pageX => wrapped.pageX; | 177 int get pageX => wrapped.page.x; |
| 178 | 178 |
| 179 int get pageY => wrapped.pageY; | 179 int get pageY => wrapped.page.y; |
| 180 | 180 |
| 181 int get screenX => wrapped.screenX; | 181 int get screenX => wrapped.screen.x; |
| 182 | 182 |
| 183 int get screenY {return wrapped.screenY; } | 183 int get screenY {return wrapped.screen.y; } |
| 184 | 184 |
| 185 EventTarget get target => wrapped.target; | 185 EventTarget get target => wrapped.target; |
| 186 | 186 |
| 187 num get webkitForce { throw new UnimplementedError(); } | 187 num get webkitForce { throw new UnimplementedError(); } |
| 188 int get webkitRadiusX { throw new UnimplementedError(); } | 188 int get webkitRadiusX { throw new UnimplementedError(); } |
| 189 int get webkitRadiusY { throw new UnimplementedError(); } | 189 int get webkitRadiusY { throw new UnimplementedError(); } |
| 190 num get webkitRotationAngle { throw new UnimplementedError(); } | 190 num get webkitRotationAngle { throw new UnimplementedError(); } |
| 191 } | 191 } |
| 192 | 192 |
| 193 class MockTouchEvent implements TouchEvent { | 193 class MockTouchEvent implements TouchEvent { |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 void stopImmediatePropagation() { wrapped.stopImmediatePropagation(); } | 229 void stopImmediatePropagation() { wrapped.stopImmediatePropagation(); } |
| 230 | 230 |
| 231 void stopPropagation() { wrapped.stopPropagation(); } | 231 void stopPropagation() { wrapped.stopPropagation(); } |
| 232 | 232 |
| 233 int get charCode => wrapped.charCode; | 233 int get charCode => wrapped.charCode; |
| 234 | 234 |
| 235 int get detail => wrapped.detail; | 235 int get detail => wrapped.detail; |
| 236 | 236 |
| 237 int get keyCode => wrapped.keyCode; | 237 int get keyCode => wrapped.keyCode; |
| 238 | 238 |
| 239 int get layerX => wrapped.layerX; | 239 int get layerX => wrapped.layer.x; |
| 240 | 240 |
| 241 int get layerY => wrapped.layerY; | 241 int get layerY => wrapped.layer.y; |
| 242 | 242 |
| 243 int get pageX => wrapped.pageX; | 243 int get pageX => wrapped.page.x; |
| 244 | 244 |
| 245 int get pageY => wrapped.pageY; | 245 int get pageY => wrapped.page.y; |
| 246 | 246 |
| 247 Window get view => wrapped.view; | 247 Window get view => wrapped.view; |
| 248 | 248 |
| 249 int get which => wrapped.which; | 249 int get which => wrapped.which; |
| 250 | 250 |
| 251 bool get altKey => wrapped.altKey; | 251 bool get altKey => wrapped.altKey; |
| 252 | 252 |
| 253 bool get ctrlKey => wrapped.ctrlKey; | 253 bool get ctrlKey => wrapped.ctrlKey; |
| 254 | 254 |
| 255 bool get metaKey => wrapped.metaKey; | 255 bool get metaKey => wrapped.metaKey; |
| 256 | 256 |
| 257 bool get shiftKey => wrapped.shiftKey; | 257 bool get shiftKey => wrapped.shiftKey; |
| 258 } | 258 } |
| OLD | NEW |