Skip to content

Commit

Permalink
Create gestures.dart
Browse files Browse the repository at this point in the history
This patch is part of a sequence of patches towards fewer top-level libraries.
In this patch, the gesture libraries are combined into one gestures.dart
library.
  • Loading branch information
abarth committed Sep 17, 2015
1 parent ceb7999 commit 9251203
Show file tree
Hide file tree
Showing 24 changed files with 46 additions and 64 deletions.
2 changes: 0 additions & 2 deletions sky/packages/sky/lib/animation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
/// This library includes and re-exports all Sky animation classes.
library animation;

export 'package:sky/src/rendering/auto_layout.dart';

export 'src/animation/animated_simulation.dart';
export 'src/animation/animated_value.dart';
export 'src/animation/animation_performance.dart';
Expand Down
16 changes: 16 additions & 0 deletions sky/packages/sky/lib/gestures.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

/// The Sky gesture recognizers
library gestures;

export 'src/gestures/arena.dart';
export 'src/gestures/constants.dart';
export 'src/gestures/drag.dart';
export 'src/gestures/long_press.dart';
export 'src/gestures/pointer_router.dart';
export 'src/gestures/recognizer.dart';
export 'src/gestures/scale.dart';
export 'src/gestures/show_press.dart';
export 'src/gestures/tap.dart';
9 changes: 0 additions & 9 deletions sky/packages/sky/lib/gestures/README.md

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

import 'dart:sky' as sky;

import 'package:sky/gestures/arena.dart';
import 'package:sky/gestures/recognizer.dart';
import 'package:sky/gestures/constants.dart';
import 'package:sky/src/gestures/arena.dart';
import 'package:sky/src/gestures/recognizer.dart';
import 'package:sky/src/gestures/constants.dart';

enum DragState {
ready,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

import 'dart:sky' as sky;

import 'package:sky/gestures/arena.dart';
import 'package:sky/gestures/constants.dart';
import 'package:sky/gestures/pointer_router.dart';
import 'package:sky/gestures/recognizer.dart';
import 'package:sky/src/gestures/arena.dart';
import 'package:sky/src/gestures/constants.dart';
import 'package:sky/src/gestures/pointer_router.dart';
import 'package:sky/src/gestures/recognizer.dart';

typedef void GestureLongPressListener();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
import 'dart:async';
import 'dart:sky' as sky;

import 'package:sky/gestures/arena.dart';
import 'package:sky/gestures/constants.dart';
import 'package:sky/gestures/pointer_router.dart';
import 'package:sky/src/gestures/arena.dart';
import 'package:sky/src/gestures/constants.dart';
import 'package:sky/src/gestures/pointer_router.dart';

export 'package:sky/gestures/pointer_router.dart' show PointerRouter;
export 'package:sky/src/gestures/pointer_router.dart' show PointerRouter;

abstract class GestureRecognizer extends GestureArenaMember {
GestureRecognizer({ PointerRouter router }) : _router = router;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'dart:math' as math;
import 'dart:sky' as sky;

import 'package:sky/gestures/arena.dart';
import 'package:sky/gestures/recognizer.dart';
import 'package:sky/gestures/constants.dart';
import 'package:sky/src/gestures/arena.dart';
import 'package:sky/src/gestures/recognizer.dart';
import 'package:sky/src/gestures/constants.dart';

enum ScaleState {
ready,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

import 'dart:sky' as sky;

import 'package:sky/gestures/arena.dart';
import 'package:sky/gestures/constants.dart';
import 'package:sky/gestures/recognizer.dart';
import 'package:sky/src/gestures/arena.dart';
import 'package:sky/src/gestures/constants.dart';
import 'package:sky/src/gestures/recognizer.dart';

typedef void GestureShowPressListener();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

import 'dart:sky' as sky;

import 'package:sky/gestures/arena.dart';
import 'package:sky/gestures/recognizer.dart';
import 'package:sky/src/gestures/arena.dart';
import 'package:sky/src/gestures/recognizer.dart';

typedef void GestureTapListener();

Expand Down
3 changes: 1 addition & 2 deletions sky/packages/sky/lib/src/rendering/sky_binding.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
import 'dart:sky' as sky;

import 'package:sky/animation.dart';
import 'package:sky/gestures/arena.dart';
import 'package:sky/gestures/pointer_router.dart';
import 'package:sky/gestures.dart';
import 'package:sky/src/rendering/box.dart';
import 'package:sky/src/rendering/hit_test.dart';
import 'package:sky/src/rendering/object.dart';
Expand Down
1 change: 0 additions & 1 deletion sky/packages/sky/lib/src/widgets/drawer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// found in the LICENSE file.

import 'dart:async';
import 'dart:sky' as sky;

import 'package:sky/animation.dart';
import 'package:sky/theme/colors.dart' as colors;
Expand Down
7 changes: 1 addition & 6 deletions sky/packages/sky/lib/src/widgets/gesture_detector.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@

import 'dart:sky' as sky;

import 'package:sky/gestures/drag.dart';
import 'package:sky/gestures/long_press.dart';
import 'package:sky/gestures/scale.dart';
import 'package:sky/gestures/recognizer.dart';
import 'package:sky/gestures/show_press.dart';
import 'package:sky/gestures/tap.dart';
import 'package:sky/gestures.dart';
import 'package:sky/src/rendering/sky_binding.dart';
import 'package:sky/src/widgets/framework.dart';

Expand Down
3 changes: 1 addition & 2 deletions sky/packages/sky/lib/src/widgets/scrollable.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import 'dart:sky' as sky;

import 'package:newton/newton.dart';
import 'package:sky/animation.dart';
import 'package:sky/gestures/constants.dart';
import 'package:sky/gestures/drag.dart';
import 'package:sky/gestures.dart';
import 'package:sky/src/rendering/box.dart';
import 'package:sky/src/rendering/viewport.dart';
import 'package:sky/src/widgets/basic.dart';
Expand Down
2 changes: 1 addition & 1 deletion sky/unit/test/gestures/arena_test.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:sky/gestures/arena.dart';
import 'package:sky/gestures.dart';
import 'package:test/test.dart';

typedef void GestureArenaCallback(Object key);
Expand Down
5 changes: 1 addition & 4 deletions sky/unit/test/gestures/long_press_test.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import 'package:quiver/testing/async.dart';
import 'package:sky/gestures/arena.dart';
import 'package:sky/gestures/long_press.dart';
import 'package:sky/gestures/pointer_router.dart';
import 'package:sky/gestures/show_press.dart';
import 'package:sky/gestures.dart';
import 'package:test/test.dart';

import '../engine/mock_events.dart';
Expand Down
2 changes: 1 addition & 1 deletion sky/unit/test/gestures/pointer_router_test.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'dart:sky' as sky;

import 'package:sky/gestures/pointer_router.dart';
import 'package:sky/gestures.dart';
import 'package:test/test.dart';

import '../engine/mock_events.dart';
Expand Down
5 changes: 1 addition & 4 deletions sky/unit/test/gestures/scroll_test.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import 'dart:sky' as sky;

import 'package:sky/gestures/arena.dart';
import 'package:sky/gestures/drag.dart';
import 'package:sky/gestures/pointer_router.dart';
import 'package:sky/gestures/tap.dart';
import 'package:sky/gestures.dart';
import 'package:test/test.dart';

import '../engine/mock_events.dart';
Expand Down
4 changes: 1 addition & 3 deletions sky/unit/test/gestures/show_press_test.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import 'package:quiver/testing/async.dart';
import 'package:sky/gestures/arena.dart';
import 'package:sky/gestures/pointer_router.dart';
import 'package:sky/gestures/show_press.dart';
import 'package:sky/gestures.dart';
import 'package:test/test.dart';

import '../engine/mock_events.dart';
Expand Down
4 changes: 1 addition & 3 deletions sky/unit/test/gestures/tap_test.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import 'package:sky/gestures/arena.dart';
import 'package:sky/gestures/pointer_router.dart';
import 'package:sky/gestures/tap.dart';
import 'package:sky/gestures.dart';
import 'package:test/test.dart';

import '../engine/mock_events.dart';
Expand Down
7 changes: 2 additions & 5 deletions sky/unit/test/widget/set_state_test.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import 'package:sky/gestures/arena.dart';
import 'package:sky/gestures/pointer_router.dart';
import 'package:sky/gestures/tap.dart';
import 'package:sky/widgets.dart';
import 'package:test/test.dart';

Expand Down Expand Up @@ -68,8 +65,8 @@ void main() {
tester.pumpFrameWithoutChange();

tester.dispatchEvent(pointer.up(), location);

tester.pumpFrameWithoutChange();

});
}
}
1 change: 0 additions & 1 deletion sky/unit/test/widget/stateful_components_test.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'package:sky/animation.dart';
import 'package:sky/widgets.dart';
import 'package:test/test.dart';

Expand Down

0 comments on commit 9251203

Please sign in to comment.