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

Side by Side Diff: sky/specs/pointer.md

Issue 924393004: Specs: strip @nonnull annotations since they're too verbose (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 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
« no previous file with comments | « sky/specs/gestures.md ('k') | sky/specs/script.md » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 this.pressure, this.minPressure, this.maxPressure, 359 this.pressure, this.minPressure, this.maxPressure,
360 this.distance, this.minDistance, this.maxDistance, 360 this.distance, this.minDistance, this.maxDistance,
361 this.radiusMajor, this.radiusMinor, this.minRadius, this.maxRad ius, 361 this.radiusMajor, this.radiusMinor, this.minRadius, this.maxRad ius,
362 this.orientation, this.tilt 362 this.orientation, this.tilt
363 }): super(); 363 }): super();
364 364
365 final int pointer; 365 final int pointer;
366 final PointerKind kind; 366 final PointerKind kind;
367 final double x; // logical pixels 367 final double x; // logical pixels
368 final double y; // logical pixels 368 final double y; // logical pixels
369 final @nonnull double dx; // logical pixels 369 final double dx; // logical pixels
370 final @nonnull double dy; // logical pixels 370 final double dy; // logical pixels
371 371
372 final @nonnull int buttons; // bit field 372 final int buttons; // bit field
373 static const int primaryMouseButton = 0x01; 373 static const int primaryMouseButton = 0x01;
374 static const int secondaryMouseButton = 0x02; 374 static const int secondaryMouseButton = 0x02;
375 static const int primaryStylusButton = 0x02; 375 static const int primaryStylusButton = 0x02;
376 static const int middleMouseButton = 0x04; 376 static const int middleMouseButton = 0x04;
377 static const int secondaryStylusButton = 0x04; 377 static const int secondaryStylusButton = 0x04;
378 static const int backButton = 0x08; 378 static const int backButton = 0x08;
379 static const int forwardButton = 0x10; 379 static const int forwardButton = 0x10;
380 380
381 final @nonnull bool down; 381 final bool down;
382 final @nonnull bool primary; 382 final bool primary;
383 final @nonnull bool obscured; 383 final bool obscured;
384 384
385 // if down != true, these are all null 385 // if down != true, these are all null
386 final double pressure; // normalised, 0.0 means none, 1.0 means "normal" 386 final double pressure; // normalised, 0.0 means none, 1.0 means "normal"
387 final double minPressure; // 0 <= minPressure <= 1.0 387 final double minPressure; // 0 <= minPressure <= 1.0
388 final double maxPressure; // maxPressure >= 1.0 388 final double maxPressure; // maxPressure >= 1.0
389 389
390 // if kind != touch, stylus, or invertedStylus, these are all null 390 // if kind != touch, stylus, or invertedStylus, these are all null
391 final double distance; // logical pixels 391 final double distance; // logical pixels
392 final double minDistance; // logical pixels 392 final double minDistance; // logical pixels
393 final double maxDistance; // logical pixels 393 final double maxDistance; // logical pixels
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 ```dart 472 ```dart
473 class WheelEvent extends Event { 473 class WheelEvent extends Event {
474 PointerEvent({ bool bubbles, 474 PointerEvent({ bool bubbles,
475 this.wheel, 475 this.wheel,
476 this.delta: 0.0, 476 this.delta: 0.0,
477 this.pointer, 477 this.pointer,
478 this.x, this.y, 478 this.x, this.y,
479 }): super(bubbles: bubbles); 479 }): super(bubbles: bubbles);
480 480
481 final int wheel; 481 final int wheel;
482 final @nonnull double delta; // revolutions (or fractions thereof) 482 final double delta; // revolutions (or fractions thereof)
483 final int pointer; 483 final int pointer;
484 final double x; // logical pixels 484 final double x; // logical pixels
485 final double y; // logical pixels 485 final double y; // logical pixels
486 486
487 bool get bubbles => false; 487 bool get bubbles => false;
488 } 488 }
489 ``` 489 ```
OLDNEW
« no previous file with comments | « sky/specs/gestures.md ('k') | sky/specs/script.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698