| OLD | NEW |
| 1 Pointer Events | 1 Pointer Events |
| 2 ============== | 2 ============== |
| 3 | 3 |
| 4 Scope | 4 Scope |
| 5 ----- | 5 ----- |
| 6 | 6 |
| 7 The following input devices are supported by sky: | 7 The following input devices are supported by sky: |
| 8 - fingers on multitouch screens | 8 - fingers on multitouch screens |
| 9 - mice, including mouse wheels | 9 - mice, including mouse wheels |
| 10 - styluses on screens | 10 - styluses on screens |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 this.pressure, this.minPressure, this.maxPressure, | 356 this.pressure, this.minPressure, this.maxPressure, |
| 357 this.distance, this.minDistance, this.maxDistance, | 357 this.distance, this.minDistance, this.maxDistance, |
| 358 this.radiusMajor, this.radiusMinor, this.minRadius, this.maxRad
ius, | 358 this.radiusMajor, this.radiusMinor, this.minRadius, this.maxRad
ius, |
| 359 this.orientation, this.tilt | 359 this.orientation, this.tilt |
| 360 }): super(); | 360 }): super(); |
| 361 | 361 |
| 362 final int pointer; | 362 final int pointer; |
| 363 final PointerKind kind; | 363 final PointerKind kind; |
| 364 final double x; // logical pixels | 364 final double x; // logical pixels |
| 365 final double y; // logical pixels | 365 final double y; // logical pixels |
| 366 final double dx; // logical pixels | 366 final @nonnull double dx; // logical pixels |
| 367 final double dy; // logical pixels | 367 final @nonnull double dy; // logical pixels |
| 368 | 368 |
| 369 final int buttons; // bit field | 369 final @nonnull int buttons; // bit field |
| 370 static const int primaryMouseButton = 0x01; | 370 static const int primaryMouseButton = 0x01; |
| 371 static const int secondaryMouseButton = 0x02; | 371 static const int secondaryMouseButton = 0x02; |
| 372 static const int primaryStylusButton = 0x02; | 372 static const int primaryStylusButton = 0x02; |
| 373 static const int middleMouseButton = 0x04; | 373 static const int middleMouseButton = 0x04; |
| 374 static const int secondaryStylusButton = 0x04; | 374 static const int secondaryStylusButton = 0x04; |
| 375 static const int backButton = 0x08; | 375 static const int backButton = 0x08; |
| 376 static const int forwardButton = 0x10; | 376 static const int forwardButton = 0x10; |
| 377 | 377 |
| 378 final bool down; | 378 final @nonnull bool down; |
| 379 final bool primary; | 379 final @nonnull bool primary; |
| 380 final bool obscured; | 380 final @nonnull bool obscured; |
| 381 | 381 |
| 382 // if down != true, these are all null | 382 // if down != true, these are all null |
| 383 final double pressure; // normalised, 0.0 means none, 1.0 means "normal" | 383 final double pressure; // normalised, 0.0 means none, 1.0 means "normal" |
| 384 final double minPressure; // 0 <= minPressure <= 1.0 | 384 final double minPressure; // 0 <= minPressure <= 1.0 |
| 385 final double maxPressure; // maxPressure >= 1.0 | 385 final double maxPressure; // maxPressure >= 1.0 |
| 386 | 386 |
| 387 // if kind != touch, stylus, or invertedStylus, these are all null | 387 // if kind != touch, stylus, or invertedStylus, these are all null |
| 388 final double distance; // logical pixels | 388 final double distance; // logical pixels |
| 389 final double minDistance; // logical pixels | 389 final double minDistance; // logical pixels |
| 390 final double maxDistance; // logical pixels | 390 final double maxDistance; // logical pixels |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 469 ```dart | 469 ```dart |
| 470 class WheelEvent extends Event { | 470 class WheelEvent extends Event { |
| 471 PointerEvent({ bool bubbles, | 471 PointerEvent({ bool bubbles, |
| 472 this.wheel, | 472 this.wheel, |
| 473 this.delta: 0.0, | 473 this.delta: 0.0, |
| 474 this.pointer, | 474 this.pointer, |
| 475 this.x, this.y, | 475 this.x, this.y, |
| 476 }): super(bubbles: bubbles); | 476 }): super(bubbles: bubbles); |
| 477 | 477 |
| 478 final int wheel; | 478 final int wheel; |
| 479 final double delta; // revolutions (or fractions thereof) | 479 final @nonnull double delta; // revolutions (or fractions thereof) |
| 480 final int pointer; | 480 final int pointer; |
| 481 final double x; // logical pixels | 481 final double x; // logical pixels |
| 482 final double y; // logical pixels | 482 final double y; // logical pixels |
| 483 | 483 |
| 484 bool get bubbles => false; | 484 bool get bubbles => false; |
| 485 } | 485 } |
| 486 ``` | 486 ``` |
| OLD | NEW |