Unverified Commit 0f6244fa authored by Alexandre Ardhuin's avatar Alexandre Ardhuin Committed by GitHub

Export public API types from gestures/*.dart library (#105864)

parent 0cdbe1fd
...@@ -19,6 +19,16 @@ import 'pointer_router.dart'; ...@@ -19,6 +19,16 @@ import 'pointer_router.dart';
import 'pointer_signal_resolver.dart'; import 'pointer_signal_resolver.dart';
import 'resampler.dart'; import 'resampler.dart';
export 'dart:ui' show Offset;
export 'package:flutter/foundation.dart' show DiagnosticsNode, InformationCollector;
export 'arena.dart' show GestureArenaManager;
export 'events.dart' show PointerEvent;
export 'hit_test.dart' show HitTestEntry, HitTestTarget, HitTestResult;
export 'pointer_router.dart' show PointerRouter;
export 'pointer_signal_resolver.dart' show PointerSignalResolver;
typedef _HandleSampleTimeChangedCallback = void Function(); typedef _HandleSampleTimeChangedCallback = void Function();
/// Class that implements clock used for sampling. /// Class that implements clock used for sampling.
......
...@@ -7,6 +7,10 @@ import 'dart:ui' as ui show PointerData, PointerChange, PointerSignalKind; ...@@ -7,6 +7,10 @@ import 'dart:ui' as ui show PointerData, PointerChange, PointerSignalKind;
import 'events.dart'; import 'events.dart';
export 'dart:ui' show PointerData;
export 'events.dart' show PointerEvent;
// Add `kPrimaryButton` to [buttons] when a pointer of certain devices is down. // Add `kPrimaryButton` to [buttons] when a pointer of certain devices is down.
// //
// TODO(tongmu): This patch is supposed to be done by embedders. Patching it // TODO(tongmu): This patch is supposed to be done by embedders. Patching it
......
...@@ -2,9 +2,10 @@ ...@@ -2,9 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import 'drag_details.dart'; import 'drag_details.dart';
export 'drag_details.dart' show DragEndDetails, DragUpdateDetails;
/// Interface for objects that receive updates about drags. /// Interface for objects that receive updates about drags.
/// ///
/// This interface is used in various ways. For example, /// This interface is used in various ways. For example,
......
...@@ -2,13 +2,14 @@ ...@@ -2,13 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import 'dart:ui' show Offset, PointerDeviceKind;
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'velocity_tracker.dart'; import 'velocity_tracker.dart';
export 'dart:ui' show Offset, PointerDeviceKind;
export 'velocity_tracker.dart' show Velocity;
/// Details object for callbacks that use [GestureDragDownCallback]. /// Details object for callbacks that use [GestureDragDownCallback].
/// ///
/// See also: /// See also:
......
...@@ -2,11 +2,12 @@ ...@@ -2,11 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import 'arena.dart';
import 'events.dart';
import 'recognizer.dart'; import 'recognizer.dart';
export 'dart:ui' show PointerDeviceKind;
export 'events.dart' show PointerDownEvent, PointerEvent;
/// A gesture recognizer that eagerly claims victory in all gesture arenas. /// A gesture recognizer that eagerly claims victory in all gesture arenas.
/// ///
/// This is typically passed in [AndroidView.gestureRecognizers] in order to immediately dispatch /// This is typically passed in [AndroidView.gestureRecognizers] in order to immediately dispatch
......
...@@ -13,6 +13,11 @@ import 'gesture_settings.dart'; ...@@ -13,6 +13,11 @@ import 'gesture_settings.dart';
export 'dart:ui' show Offset, PointerDeviceKind; export 'dart:ui' show Offset, PointerDeviceKind;
export 'package:flutter/foundation.dart' show DiagnosticPropertiesBuilder;
export 'package:vector_math/vector_math_64.dart' show Matrix4;
export 'gesture_settings.dart' show DeviceGestureSettings;
/// The bit of [PointerEvent.buttons] that corresponds to a cross-device /// The bit of [PointerEvent.buttons] that corresponds to a cross-device
/// behavior of "primary operation". /// behavior of "primary operation".
/// ///
......
...@@ -3,10 +3,14 @@ ...@@ -3,10 +3,14 @@
// found in the LICENSE file. // found in the LICENSE file.
import 'package:flutter/foundation.dart' show clampDouble; import 'package:flutter/foundation.dart' show clampDouble;
import 'arena.dart';
import 'events.dart'; import 'events.dart';
import 'recognizer.dart'; import 'recognizer.dart';
export 'dart:ui' show Offset, PointerDeviceKind;
export 'events.dart' show PointerDownEvent, PointerEvent;
enum _ForceState { enum _ForceState {
// No pointer has touched down and the detector is ready for a pointer down to occur. // No pointer has touched down and the detector is ready for a pointer down to occur.
ready, ready,
......
...@@ -3,8 +3,11 @@ ...@@ -3,8 +3,11 @@
// found in the LICENSE file. // found in the LICENSE file.
import 'dart:ui' as ui; import 'dart:ui' as ui;
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
export 'dart:ui' show FlutterView;
/// The device specific gesture settings scaled into logical pixels. /// The device specific gesture settings scaled into logical pixels.
/// ///
/// This configuration can be retrieved from the window, or more commonly from a /// This configuration can be retrieved from the window, or more commonly from a
......
...@@ -8,6 +8,12 @@ import 'package:vector_math/vector_math_64.dart'; ...@@ -8,6 +8,12 @@ import 'package:vector_math/vector_math_64.dart';
import 'events.dart'; import 'events.dart';
export 'dart:ui' show Offset;
export 'package:vector_math/vector_math_64.dart' show Matrix4;
export 'events.dart' show PointerEvent;
/// An object that can hit-test pointers. /// An object that can hit-test pointers.
abstract class HitTestable { abstract class HitTestable {
// This class is intended to be used as an interface, and should not be // This class is intended to be used as an interface, and should not be
......
...@@ -2,13 +2,17 @@ ...@@ -2,13 +2,17 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import 'arena.dart';
import 'constants.dart'; import 'constants.dart';
import 'events.dart'; import 'events.dart';
import 'recognizer.dart'; import 'recognizer.dart';
import 'velocity_tracker.dart'; import 'velocity_tracker.dart';
export 'dart:ui' show Offset, PointerDeviceKind;
export 'arena.dart' show GestureDisposition;
export 'events.dart' show PointerDownEvent, PointerEvent;
export 'velocity_tracker.dart' show Velocity;
/// Callback signature for [LongPressGestureRecognizer.onLongPressDown]. /// Callback signature for [LongPressGestureRecognizer.onLongPressDown].
/// ///
/// Called when a pointer that might cause a long-press has contacted the /// Called when a pointer that might cause a long-press has contacted the
......
...@@ -3,15 +3,23 @@ ...@@ -3,15 +3,23 @@
// found in the LICENSE file. // found in the LICENSE file.
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:vector_math/vector_math_64.dart';
import 'arena.dart';
import 'constants.dart'; import 'constants.dart';
import 'drag_details.dart'; import 'drag_details.dart';
import 'events.dart'; import 'events.dart';
import 'recognizer.dart'; import 'recognizer.dart';
import 'velocity_tracker.dart'; import 'velocity_tracker.dart';
export 'dart:ui' show PointerDeviceKind;
export 'package:flutter/foundation.dart' show DiagnosticPropertiesBuilder;
export 'drag.dart' show DragEndDetails, DragUpdateDetails;
export 'drag_details.dart' show DragDownDetails, DragStartDetails, DragUpdateDetails, GestureDragDownCallback, GestureDragStartCallback, GestureDragUpdateCallback;
export 'events.dart' show PointerDownEvent, PointerEvent, PointerPanZoomStartEvent;
export 'recognizer.dart' show DragStartBehavior;
export 'velocity_tracker.dart' show VelocityEstimate, VelocityTracker;
enum _DragState { enum _DragState {
ready, ready,
possible, possible,
......
...@@ -13,10 +13,16 @@ import 'constants.dart'; ...@@ -13,10 +13,16 @@ import 'constants.dart';
import 'drag.dart'; import 'drag.dart';
import 'drag_details.dart'; import 'drag_details.dart';
import 'events.dart'; import 'events.dart';
import 'gesture_settings.dart';
import 'recognizer.dart'; import 'recognizer.dart';
import 'velocity_tracker.dart'; import 'velocity_tracker.dart';
export 'dart:ui' show Offset, PointerDeviceKind;
export 'arena.dart' show GestureDisposition;
export 'drag.dart' show Drag;
export 'events.dart' show PointerDownEvent;
export 'gesture_settings.dart' show DeviceGestureSettings;
/// Signature for when [MultiDragGestureRecognizer] recognizes the start of a drag gesture. /// Signature for when [MultiDragGestureRecognizer] recognizes the start of a drag gesture.
typedef GestureMultiDragStartCallback = Drag? Function(Offset position); typedef GestureMultiDragStartCallback = Drag? Function(Offset position);
......
...@@ -3,17 +3,20 @@ ...@@ -3,17 +3,20 @@
// found in the LICENSE file. // found in the LICENSE file.
import 'dart:async'; import 'dart:async';
import 'package:vector_math/vector_math_64.dart';
import 'arena.dart'; import 'arena.dart';
import 'binding.dart'; import 'binding.dart';
import 'constants.dart'; import 'constants.dart';
import 'events.dart'; import 'events.dart';
import 'gesture_settings.dart';
import 'pointer_router.dart'; import 'pointer_router.dart';
import 'recognizer.dart'; import 'recognizer.dart';
import 'tap.dart'; import 'tap.dart';
export 'dart:ui' show Offset, PointerDeviceKind;
export 'events.dart' show PointerDownEvent;
export 'tap.dart' show GestureTapCancelCallback, GestureTapDownCallback, TapDownDetails, TapUpDetails;
/// Signature for callback when the user has tapped the screen at the same /// Signature for callback when the user has tapped the screen at the same
/// location twice in quick succession. /// location twice in quick succession.
/// ///
......
...@@ -4,10 +4,13 @@ ...@@ -4,10 +4,13 @@
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:vector_math/vector_math_64.dart';
import 'events.dart'; import 'events.dart';
export 'package:vector_math/vector_math_64.dart' show Matrix4;
export 'events.dart' show PointerEvent;
/// A callback that receives a [PointerEvent] /// A callback that receives a [PointerEvent]
typedef PointerRoute = void Function(PointerEvent event); typedef PointerRoute = void Function(PointerEvent event);
......
...@@ -6,6 +6,8 @@ import 'package:flutter/foundation.dart'; ...@@ -6,6 +6,8 @@ import 'package:flutter/foundation.dart';
import 'events.dart'; import 'events.dart';
export 'events.dart' show PointerSignalEvent;
/// The callback to register with a [PointerSignalResolver] to express /// The callback to register with a [PointerSignalResolver] to express
/// interest in a pointer signal event. /// interest in a pointer signal event.
typedef PointerSignalResolvedCallback = void Function(PointerSignalEvent event); typedef PointerSignalResolvedCallback = void Function(PointerSignalEvent event);
......
...@@ -7,17 +7,23 @@ import 'dart:async'; ...@@ -7,17 +7,23 @@ import 'dart:async';
import 'dart:collection'; import 'dart:collection';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:vector_math/vector_math_64.dart';
import 'arena.dart'; import 'arena.dart';
import 'binding.dart'; import 'binding.dart';
import 'constants.dart'; import 'constants.dart';
import 'debug.dart'; import 'debug.dart';
import 'events.dart'; import 'events.dart';
import 'gesture_settings.dart';
import 'pointer_router.dart'; import 'pointer_router.dart';
import 'team.dart'; import 'team.dart';
export 'dart:ui' show Offset, PointerDeviceKind;
export 'package:flutter/foundation.dart' show DiagnosticPropertiesBuilder;
export 'package:vector_math/vector_math_64.dart' show Matrix4;
export 'arena.dart' show GestureDisposition;
export 'events.dart' show PointerDownEvent, PointerEvent, PointerPanZoomStartEvent;
export 'gesture_settings.dart' show DeviceGestureSettings;
export 'pointer_router.dart' show PointerRouter; export 'pointer_router.dart' show PointerRouter;
/// Generic signature for callbacks passed to /// Generic signature for callbacks passed to
......
...@@ -6,6 +6,8 @@ import 'dart:collection'; ...@@ -6,6 +6,8 @@ import 'dart:collection';
import 'events.dart'; import 'events.dart';
export 'events.dart' show PointerEvent;
/// A callback used by [PointerEventResampler.sample] and /// A callback used by [PointerEventResampler.sample] and
/// [PointerEventResampler.stop] to process a resampled `event`. /// [PointerEventResampler.stop] to process a resampled `event`.
typedef HandleEventCallback = void Function(PointerEvent event); typedef HandleEventCallback = void Function(PointerEvent event);
......
...@@ -4,14 +4,18 @@ ...@@ -4,14 +4,18 @@
import 'dart:math' as math; import 'dart:math' as math;
import 'package:vector_math/vector_math_64.dart';
import 'arena.dart';
import 'constants.dart'; import 'constants.dart';
import 'events.dart'; import 'events.dart';
import 'recognizer.dart'; import 'recognizer.dart';
import 'velocity_tracker.dart'; import 'velocity_tracker.dart';
export 'dart:ui' show Offset, PointerDeviceKind;
export 'events.dart' show PointerDownEvent, PointerEvent, PointerPanZoomStartEvent;
export 'recognizer.dart' show DragStartBehavior;
export 'velocity_tracker.dart' show Velocity;
/// The possible states of a [ScaleGestureRecognizer]. /// The possible states of a [ScaleGestureRecognizer].
enum _ScaleState { enum _ScaleState {
/// The recognizer is ready to start recognizing a gesture. /// The recognizer is ready to start recognizing a gesture.
......
...@@ -4,13 +4,20 @@ ...@@ -4,13 +4,20 @@
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:vector_math/vector_math_64.dart' show Matrix4;
import 'arena.dart'; import 'arena.dart';
import 'constants.dart'; import 'constants.dart';
import 'events.dart'; import 'events.dart';
import 'recognizer.dart'; import 'recognizer.dart';
export 'dart:ui' show Offset, PointerDeviceKind;
export 'package:flutter/foundation.dart' show DiagnosticPropertiesBuilder;
export 'package:vector_math/vector_math_64.dart' show Matrix4;
export 'arena.dart' show GestureDisposition;
export 'events.dart' show PointerCancelEvent, PointerDownEvent, PointerEvent, PointerUpEvent;
/// Details for [GestureTapDownCallback], such as position. /// Details for [GestureTapDownCallback], such as position.
/// ///
/// See also: /// See also:
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
import 'arena.dart'; import 'arena.dart';
import 'binding.dart'; import 'binding.dart';
export 'arena.dart' show GestureArenaEntry, GestureArenaMember;
class _CombiningGestureArenaEntry implements GestureArenaEntry { class _CombiningGestureArenaEntry implements GestureArenaEntry {
_CombiningGestureArenaEntry(this._combiner, this._member); _CombiningGestureArenaEntry(this._combiner, this._member);
......
...@@ -8,7 +8,7 @@ import 'package:flutter/foundation.dart'; ...@@ -8,7 +8,7 @@ import 'package:flutter/foundation.dart';
import 'events.dart'; import 'events.dart';
import 'lsq_solver.dart'; import 'lsq_solver.dart';
export 'dart:ui' show Offset; export 'dart:ui' show Offset, PointerDeviceKind;
/// A velocity in two dimensions. /// A velocity in two dimensions.
@immutable @immutable
......
...@@ -11,7 +11,6 @@ import 'package:flutter/foundation.dart'; ...@@ -11,7 +11,6 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart'; import 'package:flutter/gestures.dart';
import 'package:flutter/semantics.dart'; import 'package:flutter/semantics.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:vector_math/vector_math_64.dart';
import 'box.dart'; import 'box.dart';
import 'custom_paint.dart'; import 'custom_paint.dart';
......
...@@ -14,8 +14,6 @@ import 'package:flutter/foundation.dart'; ...@@ -14,8 +14,6 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart'; import 'package:flutter/gestures.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:vector_math/vector_math_64.dart' show Matrix4;
import 'object.dart'; import 'object.dart';
export 'package:flutter/services.dart' show export 'package:flutter/services.dart' show
......
...@@ -10,7 +10,6 @@ import 'package:flutter/foundation.dart'; ...@@ -10,7 +10,6 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart'; import 'package:flutter/gestures.dart';
import 'package:flutter/painting.dart'; import 'package:flutter/painting.dart';
import 'package:flutter/semantics.dart'; import 'package:flutter/semantics.dart';
import 'package:vector_math/vector_math_64.dart';
import 'debug.dart'; import 'debug.dart';
import 'layer.dart'; import 'layer.dart';
......
...@@ -10,8 +10,6 @@ import 'package:flutter/foundation.dart'; ...@@ -10,8 +10,6 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart'; import 'package:flutter/gestures.dart';
import 'package:flutter/semantics.dart'; import 'package:flutter/semantics.dart';
import 'package:vector_math/vector_math_64.dart';
import 'box.dart'; import 'box.dart';
import 'debug.dart'; import 'debug.dart';
import 'layer.dart'; import 'layer.dart';
......
...@@ -10,8 +10,6 @@ import 'package:flutter/gestures.dart'; ...@@ -10,8 +10,6 @@ import 'package:flutter/gestures.dart';
import 'package:flutter/semantics.dart'; import 'package:flutter/semantics.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:vector_math/vector_math_64.dart';
import 'box.dart'; import 'box.dart';
import 'layer.dart'; import 'layer.dart';
import 'layout_helper.dart'; import 'layout_helper.dart';
......
...@@ -6,7 +6,6 @@ import 'dart:math' as math; ...@@ -6,7 +6,6 @@ import 'dart:math' as math;
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart'; import 'package:flutter/gestures.dart';
import 'package:vector_math/vector_math_64.dart';
import 'box.dart'; import 'box.dart';
import 'debug.dart'; import 'debug.dart';
......
...@@ -8,7 +8,9 @@ import 'package:flutter/foundation.dart'; ...@@ -8,7 +8,9 @@ import 'package:flutter/foundation.dart';
import 'binding.dart'; import 'binding.dart';
export 'package:flutter/foundation.dart' show DiagnosticsNode, VoidCallback; export 'dart:ui' show VoidCallback;
export 'package:flutter/foundation.dart' show DiagnosticsNode;
/// Signature for the callback passed to the [Ticker] class's constructor. /// Signature for the callback passed to the [Ticker] class's constructor.
/// ///
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
// found in the LICENSE file. // found in the LICENSE file.
import 'package:flutter/gestures.dart'; import 'package:flutter/gestures.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import 'package:vector_math/vector_math_64.dart'; import 'package:vector_math/vector_math_64.dart';
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
import 'package:flutter/gestures.dart'; import 'package:flutter/gestures.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import 'package:vector_math/vector_math_64.dart';
void main() { void main() {
test('wrapped HitTestResult gets HitTestEntry added to wrapping HitTestResult', () async { test('wrapped HitTestResult gets HitTestEntry added to wrapping HitTestResult', () async {
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart'; import 'package:flutter/gestures.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import 'package:vector_math/vector_math_64.dart';
void main() { void main() {
test('Should route pointers', () { test('Should route pointers', () {
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
import 'package:flutter/gestures.dart'; import 'package:flutter/gestures.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import 'package:vector_math/vector_math_64.dart';
class TestPointerSignalListener { class TestPointerSignalListener {
TestPointerSignalListener(this.event); TestPointerSignalListener(this.event);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment