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';
import 'pointer_signal_resolver.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();
/// Class that implements clock used for sampling.
......
......@@ -7,6 +7,10 @@ import 'dart:ui' as ui show PointerData, PointerChange, PointerSignalKind;
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.
//
// TODO(tongmu): This patch is supposed to be done by embedders. Patching it
......
......@@ -2,9 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'drag_details.dart';
export 'drag_details.dart' show DragEndDetails, DragUpdateDetails;
/// Interface for objects that receive updates about drags.
///
/// This interface is used in various ways. For example,
......
......@@ -2,13 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:ui' show Offset, PointerDeviceKind;
import 'package:flutter/foundation.dart';
import 'velocity_tracker.dart';
export 'dart:ui' show Offset, PointerDeviceKind;
export 'velocity_tracker.dart' show Velocity;
/// Details object for callbacks that use [GestureDragDownCallback].
///
/// See also:
......
......@@ -2,11 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'arena.dart';
import 'events.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.
///
/// This is typically passed in [AndroidView.gestureRecognizers] in order to immediately dispatch
......
......@@ -13,6 +13,11 @@ import 'gesture_settings.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 'gesture_settings.dart' show DeviceGestureSettings;
/// The bit of [PointerEvent.buttons] that corresponds to a cross-device
/// behavior of "primary operation".
///
......
......@@ -3,10 +3,14 @@
// found in the LICENSE file.
import 'package:flutter/foundation.dart' show clampDouble;
import 'arena.dart';
import 'events.dart';
import 'recognizer.dart';
export 'dart:ui' show Offset, PointerDeviceKind;
export 'events.dart' show PointerDownEvent, PointerEvent;
enum _ForceState {
// No pointer has touched down and the detector is ready for a pointer down to occur.
ready,
......
......@@ -3,8 +3,11 @@
// found in the LICENSE file.
import 'dart:ui' as ui;
import 'package:flutter/foundation.dart';
export 'dart:ui' show FlutterView;
/// The device specific gesture settings scaled into logical pixels.
///
/// 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';
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.
abstract class HitTestable {
// This class is intended to be used as an interface, and should not be
......
......@@ -2,13 +2,17 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'arena.dart';
import 'constants.dart';
import 'events.dart';
import 'recognizer.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].
///
/// Called when a pointer that might cause a long-press has contacted the
......
......@@ -3,15 +3,23 @@
// found in the LICENSE file.
import 'package:flutter/foundation.dart';
import 'package:vector_math/vector_math_64.dart';
import 'arena.dart';
import 'constants.dart';
import 'drag_details.dart';
import 'events.dart';
import 'recognizer.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 {
ready,
possible,
......
......@@ -13,10 +13,16 @@ import 'constants.dart';
import 'drag.dart';
import 'drag_details.dart';
import 'events.dart';
import 'gesture_settings.dart';
import 'recognizer.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.
typedef GestureMultiDragStartCallback = Drag? Function(Offset position);
......
......@@ -3,17 +3,20 @@
// found in the LICENSE file.
import 'dart:async';
import 'package:vector_math/vector_math_64.dart';
import 'arena.dart';
import 'binding.dart';
import 'constants.dart';
import 'events.dart';
import 'gesture_settings.dart';
import 'pointer_router.dart';
import 'recognizer.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
/// location twice in quick succession.
///
......
......@@ -4,10 +4,13 @@
import 'package:flutter/foundation.dart';
import 'package:vector_math/vector_math_64.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]
typedef PointerRoute = void Function(PointerEvent event);
......
......@@ -6,6 +6,8 @@ import 'package:flutter/foundation.dart';
import 'events.dart';
export 'events.dart' show PointerSignalEvent;
/// The callback to register with a [PointerSignalResolver] to express
/// interest in a pointer signal event.
typedef PointerSignalResolvedCallback = void Function(PointerSignalEvent event);
......
......@@ -7,17 +7,23 @@ import 'dart:async';
import 'dart:collection';
import 'package:flutter/foundation.dart';
import 'package:vector_math/vector_math_64.dart';
import 'arena.dart';
import 'binding.dart';
import 'constants.dart';
import 'debug.dart';
import 'events.dart';
import 'gesture_settings.dart';
import 'pointer_router.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;
/// Generic signature for callbacks passed to
......
......@@ -6,6 +6,8 @@ import 'dart:collection';
import 'events.dart';
export 'events.dart' show PointerEvent;
/// A callback used by [PointerEventResampler.sample] and
/// [PointerEventResampler.stop] to process a resampled `event`.
typedef HandleEventCallback = void Function(PointerEvent event);
......
......@@ -4,14 +4,18 @@
import 'dart:math' as math;
import 'package:vector_math/vector_math_64.dart';
import 'arena.dart';
import 'constants.dart';
import 'events.dart';
import 'recognizer.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].
enum _ScaleState {
/// The recognizer is ready to start recognizing a gesture.
......
......@@ -4,13 +4,20 @@
import 'package:flutter/foundation.dart';
import 'package:vector_math/vector_math_64.dart' show Matrix4;
import 'arena.dart';
import 'constants.dart';
import 'events.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.
///
/// See also:
......
......@@ -6,6 +6,8 @@
import 'arena.dart';
import 'binding.dart';
export 'arena.dart' show GestureArenaEntry, GestureArenaMember;
class _CombiningGestureArenaEntry implements GestureArenaEntry {
_CombiningGestureArenaEntry(this._combiner, this._member);
......
......@@ -8,7 +8,7 @@ import 'package:flutter/foundation.dart';
import 'events.dart';
import 'lsq_solver.dart';
export 'dart:ui' show Offset;
export 'dart:ui' show Offset, PointerDeviceKind;
/// A velocity in two dimensions.
@immutable
......
......@@ -11,7 +11,6 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/semantics.dart';
import 'package:flutter/services.dart';
import 'package:vector_math/vector_math_64.dart';
import 'box.dart';
import 'custom_paint.dart';
......
......@@ -14,8 +14,6 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/services.dart';
import 'package:vector_math/vector_math_64.dart' show Matrix4;
import 'object.dart';
export 'package:flutter/services.dart' show
......
......@@ -10,7 +10,6 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/painting.dart';
import 'package:flutter/semantics.dart';
import 'package:vector_math/vector_math_64.dart';
import 'debug.dart';
import 'layer.dart';
......
......@@ -10,8 +10,6 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/semantics.dart';
import 'package:vector_math/vector_math_64.dart';
import 'box.dart';
import 'debug.dart';
import 'layer.dart';
......
......@@ -10,8 +10,6 @@ import 'package:flutter/gestures.dart';
import 'package:flutter/semantics.dart';
import 'package:flutter/services.dart';
import 'package:vector_math/vector_math_64.dart';
import 'box.dart';
import 'layer.dart';
import 'layout_helper.dart';
......
......@@ -6,7 +6,6 @@ import 'dart:math' as math;
import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart';
import 'package:vector_math/vector_math_64.dart';
import 'box.dart';
import 'debug.dart';
......
......@@ -8,7 +8,9 @@ import 'package:flutter/foundation.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.
///
......
......@@ -3,7 +3,6 @@
// found in the LICENSE file.
import 'package:flutter/gestures.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:vector_math/vector_math_64.dart';
......
......@@ -4,7 +4,6 @@
import 'package:flutter/gestures.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:vector_math/vector_math_64.dart';
void main() {
test('wrapped HitTestResult gets HitTestEntry added to wrapping HitTestResult', () async {
......
......@@ -5,7 +5,6 @@
import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:vector_math/vector_math_64.dart';
void main() {
test('Should route pointers', () {
......
......@@ -4,7 +4,6 @@
import 'package:flutter/gestures.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:vector_math/vector_math_64.dart';
class TestPointerSignalListener {
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