Rename PointerInputWrapper to PointerInput.
Also added some docs.
Fixes: 148380029
Test: ./gradlew ui:ui-framework:test
Test: ./gradlew ui:ui-framework:connectedCheck
Test: ./gradlew ui:ui-test:test
Test: ./gradlew ui:ui-test:connectedCheck
Change-Id: Icbeca15cf9a15c883e7f28b38bb7441feead70d3
diff --git a/ui/ui-framework/api/0.1.0-dev04.txt b/ui/ui-framework/api/0.1.0-dev04.txt
index 5097325..4d0488e 100644
--- a/ui/ui-framework/api/0.1.0-dev04.txt
+++ b/ui/ui-framework/api/0.1.0-dev04.txt
@@ -86,7 +86,7 @@
}
public final class PointerInputWrapperKt {
- method public static inline void PointerInputWrapper(kotlin.jvm.functions.Function3<? super java.util.List<androidx.ui.core.PointerInputChange>,? super androidx.ui.core.PointerEventPass,? super androidx.ui.unit.IntPxSize,? extends java.util.List<androidx.ui.core.PointerInputChange>> pointerInputHandler, kotlin.jvm.functions.Function0<kotlin.Unit> cancelHandler, kotlin.jvm.functions.Function0<kotlin.Unit> children);
+ method public static inline void PointerInput(kotlin.jvm.functions.Function3<? super java.util.List<androidx.ui.core.PointerInputChange>,? super androidx.ui.core.PointerEventPass,? super androidx.ui.unit.IntPxSize,? extends java.util.List<androidx.ui.core.PointerInputChange>> pointerInputHandler, kotlin.jvm.functions.Function0<kotlin.Unit> cancelHandler, kotlin.jvm.functions.Function0<kotlin.Unit> children);
}
public final class PopupKt {
diff --git a/ui/ui-framework/api/current.txt b/ui/ui-framework/api/current.txt
index 5097325..4d0488e 100644
--- a/ui/ui-framework/api/current.txt
+++ b/ui/ui-framework/api/current.txt
@@ -86,7 +86,7 @@
}
public final class PointerInputWrapperKt {
- method public static inline void PointerInputWrapper(kotlin.jvm.functions.Function3<? super java.util.List<androidx.ui.core.PointerInputChange>,? super androidx.ui.core.PointerEventPass,? super androidx.ui.unit.IntPxSize,? extends java.util.List<androidx.ui.core.PointerInputChange>> pointerInputHandler, kotlin.jvm.functions.Function0<kotlin.Unit> cancelHandler, kotlin.jvm.functions.Function0<kotlin.Unit> children);
+ method public static inline void PointerInput(kotlin.jvm.functions.Function3<? super java.util.List<androidx.ui.core.PointerInputChange>,? super androidx.ui.core.PointerEventPass,? super androidx.ui.unit.IntPxSize,? extends java.util.List<androidx.ui.core.PointerInputChange>> pointerInputHandler, kotlin.jvm.functions.Function0<kotlin.Unit> cancelHandler, kotlin.jvm.functions.Function0<kotlin.Unit> children);
}
public final class PopupKt {
diff --git a/ui/ui-framework/api/public_plus_experimental_0.1.0-dev04.txt b/ui/ui-framework/api/public_plus_experimental_0.1.0-dev04.txt
index 5097325..4d0488e 100644
--- a/ui/ui-framework/api/public_plus_experimental_0.1.0-dev04.txt
+++ b/ui/ui-framework/api/public_plus_experimental_0.1.0-dev04.txt
@@ -86,7 +86,7 @@
}
public final class PointerInputWrapperKt {
- method public static inline void PointerInputWrapper(kotlin.jvm.functions.Function3<? super java.util.List<androidx.ui.core.PointerInputChange>,? super androidx.ui.core.PointerEventPass,? super androidx.ui.unit.IntPxSize,? extends java.util.List<androidx.ui.core.PointerInputChange>> pointerInputHandler, kotlin.jvm.functions.Function0<kotlin.Unit> cancelHandler, kotlin.jvm.functions.Function0<kotlin.Unit> children);
+ method public static inline void PointerInput(kotlin.jvm.functions.Function3<? super java.util.List<androidx.ui.core.PointerInputChange>,? super androidx.ui.core.PointerEventPass,? super androidx.ui.unit.IntPxSize,? extends java.util.List<androidx.ui.core.PointerInputChange>> pointerInputHandler, kotlin.jvm.functions.Function0<kotlin.Unit> cancelHandler, kotlin.jvm.functions.Function0<kotlin.Unit> children);
}
public final class PopupKt {
diff --git a/ui/ui-framework/api/public_plus_experimental_current.txt b/ui/ui-framework/api/public_plus_experimental_current.txt
index 5097325..4d0488e 100644
--- a/ui/ui-framework/api/public_plus_experimental_current.txt
+++ b/ui/ui-framework/api/public_plus_experimental_current.txt
@@ -86,7 +86,7 @@
}
public final class PointerInputWrapperKt {
- method public static inline void PointerInputWrapper(kotlin.jvm.functions.Function3<? super java.util.List<androidx.ui.core.PointerInputChange>,? super androidx.ui.core.PointerEventPass,? super androidx.ui.unit.IntPxSize,? extends java.util.List<androidx.ui.core.PointerInputChange>> pointerInputHandler, kotlin.jvm.functions.Function0<kotlin.Unit> cancelHandler, kotlin.jvm.functions.Function0<kotlin.Unit> children);
+ method public static inline void PointerInput(kotlin.jvm.functions.Function3<? super java.util.List<androidx.ui.core.PointerInputChange>,? super androidx.ui.core.PointerEventPass,? super androidx.ui.unit.IntPxSize,? extends java.util.List<androidx.ui.core.PointerInputChange>> pointerInputHandler, kotlin.jvm.functions.Function0<kotlin.Unit> cancelHandler, kotlin.jvm.functions.Function0<kotlin.Unit> children);
}
public final class PopupKt {
diff --git a/ui/ui-framework/api/restricted_0.1.0-dev04.txt b/ui/ui-framework/api/restricted_0.1.0-dev04.txt
index 5097325..4d0488e 100644
--- a/ui/ui-framework/api/restricted_0.1.0-dev04.txt
+++ b/ui/ui-framework/api/restricted_0.1.0-dev04.txt
@@ -86,7 +86,7 @@
}
public final class PointerInputWrapperKt {
- method public static inline void PointerInputWrapper(kotlin.jvm.functions.Function3<? super java.util.List<androidx.ui.core.PointerInputChange>,? super androidx.ui.core.PointerEventPass,? super androidx.ui.unit.IntPxSize,? extends java.util.List<androidx.ui.core.PointerInputChange>> pointerInputHandler, kotlin.jvm.functions.Function0<kotlin.Unit> cancelHandler, kotlin.jvm.functions.Function0<kotlin.Unit> children);
+ method public static inline void PointerInput(kotlin.jvm.functions.Function3<? super java.util.List<androidx.ui.core.PointerInputChange>,? super androidx.ui.core.PointerEventPass,? super androidx.ui.unit.IntPxSize,? extends java.util.List<androidx.ui.core.PointerInputChange>> pointerInputHandler, kotlin.jvm.functions.Function0<kotlin.Unit> cancelHandler, kotlin.jvm.functions.Function0<kotlin.Unit> children);
}
public final class PopupKt {
diff --git a/ui/ui-framework/api/restricted_current.txt b/ui/ui-framework/api/restricted_current.txt
index 5097325..4d0488e 100644
--- a/ui/ui-framework/api/restricted_current.txt
+++ b/ui/ui-framework/api/restricted_current.txt
@@ -86,7 +86,7 @@
}
public final class PointerInputWrapperKt {
- method public static inline void PointerInputWrapper(kotlin.jvm.functions.Function3<? super java.util.List<androidx.ui.core.PointerInputChange>,? super androidx.ui.core.PointerEventPass,? super androidx.ui.unit.IntPxSize,? extends java.util.List<androidx.ui.core.PointerInputChange>> pointerInputHandler, kotlin.jvm.functions.Function0<kotlin.Unit> cancelHandler, kotlin.jvm.functions.Function0<kotlin.Unit> children);
+ method public static inline void PointerInput(kotlin.jvm.functions.Function3<? super java.util.List<androidx.ui.core.PointerInputChange>,? super androidx.ui.core.PointerEventPass,? super androidx.ui.unit.IntPxSize,? extends java.util.List<androidx.ui.core.PointerInputChange>> pointerInputHandler, kotlin.jvm.functions.Function0<kotlin.Unit> cancelHandler, kotlin.jvm.functions.Function0<kotlin.Unit> children);
}
public final class PopupKt {
diff --git a/ui/ui-framework/src/main/java/androidx/ui/core/PointerInputWrapper.kt b/ui/ui-framework/src/main/java/androidx/ui/core/PointerInputWrapper.kt
index ff8223a..90f8cb8 100644
--- a/ui/ui-framework/src/main/java/androidx/ui/core/PointerInputWrapper.kt
+++ b/ui/ui-framework/src/main/java/androidx/ui/core/PointerInputWrapper.kt
@@ -17,9 +17,32 @@
import androidx.compose.Composable
-// TODO: Rename
+/**
+ * [PointerInput] is the compose ui core component for receiving and interacting with pointer input.
+ *
+ * Pointer input includes all user input related to 2d positioning on the screen. This includes
+ * (but is not necessarily limited to) fingers touching the screen, a mouse moving across the
+ * screen, and stylus input.
+ *
+ * [PointerInput] takes the virtual size of all of it's descendant [Layout] nodes and when a pointer
+ * comes in contact with the screen, hit testing is automatically done using that virtual size.
+ *
+ * [pointerInputHandler] is invoked when pointers that have hit tested positive change.
+ *
+ * [cancelHandler] is invoked to notify the handler that no more calls to pointerInputHandler will
+ * be made, until at least new pointers exist. This can occur for a few reasons:
+ * 1. Android dispatches ACTION_CANCEL to [AndroidComposeView.onTouchEvent].
+ * 2. The PointerInputNode has been removed from the compose hierarchy.
+ * 3. The PointerInputNode no longer has any descendant [LayoutNode]s and therefore does not
+ * know what region of the screen it should virtually exist in.
+ *
+ * @param pointerInputHandler Invoked when pointers that have hit this [PointerInput] change.
+ * @param cancelHandler Invoked when a cancellation event occurs.
+ * @param children The children composable that will be composed as a child, or children, of this
+ * [PointerInput].
+ */
@Composable
-inline fun PointerInputWrapper(
+inline fun PointerInput(
noinline pointerInputHandler: PointerInputHandler,
noinline cancelHandler: () -> Unit,
crossinline children: @Composable() () -> Unit
diff --git a/ui/ui-framework/src/main/java/androidx/ui/core/gesture/DoubleTapGestureDetector.kt b/ui/ui-framework/src/main/java/androidx/ui/core/gesture/DoubleTapGestureDetector.kt
index e91364c..ea5d8cd 100644
--- a/ui/ui-framework/src/main/java/androidx/ui/core/gesture/DoubleTapGestureDetector.kt
+++ b/ui/ui-framework/src/main/java/androidx/ui/core/gesture/DoubleTapGestureDetector.kt
@@ -21,7 +21,7 @@
import androidx.ui.core.CoroutineContextAmbient
import androidx.ui.core.PointerEventPass
import androidx.ui.core.PointerInputChange
-import androidx.ui.core.PointerInputWrapper
+import androidx.ui.core.PointerInput
import androidx.ui.core.anyPositionChangeConsumed
import androidx.ui.core.changedToDown
import androidx.ui.core.changedToUp
@@ -58,7 +58,7 @@
val recognizer = remember { DoubleTapGestureRecognizer(coroutineContext) }
recognizer.>
- PointerInputWrapper(
+ PointerInput(
pointerInputHandler = recognizer.pointerInputHandler,
cancelHandler = recognizer.cancelHandler,
children = children
diff --git a/ui/ui-framework/src/main/java/androidx/ui/core/gesture/LongPressDragGestureDetector.kt b/ui/ui-framework/src/main/java/androidx/ui/core/gesture/LongPressDragGestureDetector.kt
index 87e8a0d..034fcb2 100644
--- a/ui/ui-framework/src/main/java/androidx/ui/core/gesture/LongPressDragGestureDetector.kt
+++ b/ui/ui-framework/src/main/java/androidx/ui/core/gesture/LongPressDragGestureDetector.kt
@@ -21,7 +21,7 @@
import androidx.ui.core.PointerEventPass
import androidx.ui.core.PointerInputChange
import androidx.ui.core.PointerInputHandler
-import androidx.ui.core.PointerInputWrapper
+import androidx.ui.core.PointerInput
import androidx.ui.core.changedToUpIgnoreConsumed
import androidx.ui.unit.IntPxSize
import androidx.ui.unit.PxPosition
@@ -125,7 +125,7 @@
glue.longPressDragObserver = longPressDragObserver
RawDragGestureDetector(glue.dragObserver, glue::dragEnabled) {
- PointerInputWrapper(glue.pointerInputHandler, glue.cancelHandler) {
+ PointerInput(glue.pointerInputHandler, glue.cancelHandler) {
LongPressGestureDetector(glue.onLongPress, children)
}
}
diff --git a/ui/ui-framework/src/main/java/androidx/ui/core/gesture/LongPressGestureDetector.kt b/ui/ui-framework/src/main/java/androidx/ui/core/gesture/LongPressGestureDetector.kt
index 96534b5..d008ae1 100644
--- a/ui/ui-framework/src/main/java/androidx/ui/core/gesture/LongPressGestureDetector.kt
+++ b/ui/ui-framework/src/main/java/androidx/ui/core/gesture/LongPressGestureDetector.kt
@@ -21,7 +21,7 @@
import androidx.ui.core.CoroutineContextAmbient
import androidx.ui.core.PointerEventPass
import androidx.ui.core.PointerInputChange
-import androidx.ui.core.PointerInputWrapper
+import androidx.ui.core.PointerInput
import androidx.ui.core.anyPositionChangeConsumed
import androidx.ui.core.changedToDown
import androidx.ui.core.changedToUp
@@ -55,7 +55,7 @@
remember { LongPressGestureRecognizer(coroutineContext) }
recognizer.>
- PointerInputWrapper(
+ PointerInput(
pointerInputHandler = recognizer.pointerInputHandler,
cancelHandler = recognizer.cancelHandler,
children = children
diff --git a/ui/ui-framework/src/main/java/androidx/ui/core/gesture/PressIndicatorGestureDetector.kt b/ui/ui-framework/src/main/java/androidx/ui/core/gesture/PressIndicatorGestureDetector.kt
index d7351d2..580efec 100644
--- a/ui/ui-framework/src/main/java/androidx/ui/core/gesture/PressIndicatorGestureDetector.kt
+++ b/ui/ui-framework/src/main/java/androidx/ui/core/gesture/PressIndicatorGestureDetector.kt
@@ -20,7 +20,7 @@
import androidx.compose.remember
import androidx.ui.core.PointerEventPass
import androidx.ui.core.PointerInputChange
-import androidx.ui.core.PointerInputWrapper
+import androidx.ui.core.PointerInput
import androidx.ui.core.anyPositionChangeConsumed
import androidx.ui.core.changedToDown
import androidx.ui.core.changedToUpIgnoreConsumed
@@ -61,7 +61,7 @@
recognizer.>
recognizer.setEnabled(enabled)
- PointerInputWrapper(
+ PointerInput(
pointerInputHandler = recognizer.pointerInputHandler,
cancelHandler = recognizer.cancelHandler,
children = children
diff --git a/ui/ui-framework/src/main/java/androidx/ui/core/gesture/PressReleasedGestureDetector.kt b/ui/ui-framework/src/main/java/androidx/ui/core/gesture/PressReleasedGestureDetector.kt
index e769bde..fadb133 100644
--- a/ui/ui-framework/src/main/java/androidx/ui/core/gesture/PressReleasedGestureDetector.kt
+++ b/ui/ui-framework/src/main/java/androidx/ui/core/gesture/PressReleasedGestureDetector.kt
@@ -20,7 +20,7 @@
import androidx.compose.remember
import androidx.ui.core.PointerEventPass
import androidx.ui.core.PointerInputChange
-import androidx.ui.core.PointerInputWrapper
+import androidx.ui.core.PointerInput
import androidx.ui.core.anyPositionChangeConsumed
import androidx.ui.core.changedToDown
import androidx.ui.core.changedToUp
@@ -60,7 +60,7 @@
recognizer.consumeDownOnStart = consumeDownOnStart
recognizer.setEnabled(enabled)
- PointerInputWrapper(
+ PointerInput(
pointerInputHandler = recognizer.pointerInputHandler,
cancelHandler = recognizer.cancelHandler,
children = children
diff --git a/ui/ui-framework/src/main/java/androidx/ui/core/gesture/RawDragGestureDetector.kt b/ui/ui-framework/src/main/java/androidx/ui/core/gesture/RawDragGestureDetector.kt
index e09c0eb..a6f468d 100644
--- a/ui/ui-framework/src/main/java/androidx/ui/core/gesture/RawDragGestureDetector.kt
+++ b/ui/ui-framework/src/main/java/androidx/ui/core/gesture/RawDragGestureDetector.kt
@@ -20,7 +20,7 @@
import androidx.compose.remember
import androidx.ui.core.PointerEventPass
import androidx.ui.core.PointerInputChange
-import androidx.ui.core.PointerInputWrapper
+import androidx.ui.core.PointerInput
import androidx.ui.core.changedToDown
import androidx.ui.core.changedToDownIgnoreConsumed
import androidx.ui.core.changedToUp
@@ -30,7 +30,6 @@
import androidx.ui.core.gesture.util.VelocityTracker
import androidx.ui.core.positionChange
import androidx.ui.core.PointerId
-import androidx.ui.core.PointerInputWrapper
import androidx.ui.unit.IntPxSize
import androidx.ui.unit.PxPosition
import androidx.ui.unit.px
@@ -134,7 +133,7 @@
recognizer.dragObserver = dragObserver
recognizer.canStartDragging = canStartDragging
- PointerInputWrapper(
+ PointerInput(
pointerInputHandler = recognizer.pointerInputHandler,
cancelHandler = recognizer.cancelHandler,
children = children
diff --git a/ui/ui-framework/src/main/java/androidx/ui/core/gesture/RawPressStartGestureDetector.kt b/ui/ui-framework/src/main/java/androidx/ui/core/gesture/RawPressStartGestureDetector.kt
index 596b55c..bd23147 100644
--- a/ui/ui-framework/src/main/java/androidx/ui/core/gesture/RawPressStartGestureDetector.kt
+++ b/ui/ui-framework/src/main/java/androidx/ui/core/gesture/RawPressStartGestureDetector.kt
@@ -20,7 +20,7 @@
import androidx.compose.remember
import androidx.ui.core.PointerEventPass
import androidx.ui.core.PointerInputChange
-import androidx.ui.core.PointerInputWrapper
+import androidx.ui.core.PointerInput
import androidx.ui.core.changedToDown
import androidx.ui.core.changedToUp
import androidx.ui.core.consumeDownChange
@@ -60,7 +60,7 @@
recognizer.setEnabled(enabled = enabled)
recognizer.setExecutionPass(executionPass)
- PointerInputWrapper(
+ PointerInput(
pointerInputHandler = recognizer.pointerInputHandler,
cancelHandler = recognizer.cancelHandler,
children = children)
diff --git a/ui/ui-framework/src/main/java/androidx/ui/core/gesture/RawScaleGestureDetector.kt b/ui/ui-framework/src/main/java/androidx/ui/core/gesture/RawScaleGestureDetector.kt
index b19bda7..7b0e878 100644
--- a/ui/ui-framework/src/main/java/androidx/ui/core/gesture/RawScaleGestureDetector.kt
+++ b/ui/ui-framework/src/main/java/androidx/ui/core/gesture/RawScaleGestureDetector.kt
@@ -20,7 +20,7 @@
import androidx.compose.remember
import androidx.ui.core.PointerEventPass
import androidx.ui.core.PointerInputChange
-import androidx.ui.core.PointerInputWrapper
+import androidx.ui.core.PointerInput
import androidx.ui.core.changedToDown
import androidx.ui.core.changedToUp
import androidx.ui.core.consumeDownChange
@@ -127,7 +127,7 @@
recognizer.scaleObserver = scaleObserver
recognizer.canStartScaling = canStartScaling
- PointerInputWrapper(
+ PointerInput(
pointerInputHandler = recognizer.pointerInputHandler,
cancelHandler = recognizer.cancelHandler,
children = children
diff --git a/ui/ui-framework/src/main/java/androidx/ui/core/gesture/ScaleSlopExceededGestureDetector.kt b/ui/ui-framework/src/main/java/androidx/ui/core/gesture/ScaleSlopExceededGestureDetector.kt
index 86ad7ee..fc93130 100644
--- a/ui/ui-framework/src/main/java/androidx/ui/core/gesture/ScaleSlopExceededGestureDetector.kt
+++ b/ui/ui-framework/src/main/java/androidx/ui/core/gesture/ScaleSlopExceededGestureDetector.kt
@@ -20,7 +20,7 @@
import androidx.compose.remember
import androidx.ui.core.PointerEventPass
import androidx.ui.core.PointerInputChange
-import androidx.ui.core.PointerInputWrapper
+import androidx.ui.core.PointerInput
import androidx.ui.core.ambientDensity
import androidx.ui.core.changedToUpIgnoreConsumed
import androidx.ui.unit.IntPxSize
@@ -57,7 +57,7 @@
// TODO(b/129784010): Consider also allowing onStart, onScale, and onEnd to be set individually.
recognizer.>
- PointerInputWrapper(
+ PointerInput(
pointerInputHandler = recognizer.pointerInputHandler,
cancelHandler = recognizer.cancelHandler,
children = children
diff --git a/ui/ui-framework/src/main/java/androidx/ui/core/gesture/TouchSlopExceededGestureDetector.kt b/ui/ui-framework/src/main/java/androidx/ui/core/gesture/TouchSlopExceededGestureDetector.kt
index bc8e467..895db82 100644
--- a/ui/ui-framework/src/main/java/androidx/ui/core/gesture/TouchSlopExceededGestureDetector.kt
+++ b/ui/ui-framework/src/main/java/androidx/ui/core/gesture/TouchSlopExceededGestureDetector.kt
@@ -21,13 +21,11 @@
import androidx.ui.core.Direction
import androidx.ui.core.PointerEventPass
import androidx.ui.core.PointerInputChange
-import androidx.ui.core.PointerInputWrapper
+import androidx.ui.core.PointerInput
import androidx.ui.core.ambientDensity
import androidx.ui.core.changedToDownIgnoreConsumed
import androidx.ui.core.changedToUpIgnoreConsumed
import androidx.ui.core.positionChange
-import androidx.ui.core.PointerInputWrapper
-import androidx.ui.core.ambientDensity
import androidx.ui.core.PointerId
import androidx.ui.unit.IntPx
import androidx.ui.unit.IntPxSize
@@ -57,7 +55,7 @@
recognizer.canDrag = canDrag
recognizer.>
- PointerInputWrapper(
+ PointerInput(
pointerInputHandler = recognizer.pointerInputHandler,
cancelHandler = recognizer.cancelHandler,
children = children
diff --git a/ui/ui-test/src/androidTest/java/androidx/ui/test/SendDoubleClickTest.kt b/ui/ui-test/src/androidTest/java/androidx/ui/test/SendDoubleClickTest.kt
index 410e953..68adf03 100644
--- a/ui/ui-test/src/androidTest/java/androidx/ui/test/SendDoubleClickTest.kt
+++ b/ui/ui-test/src/androidTest/java/androidx/ui/test/SendDoubleClickTest.kt
@@ -20,7 +20,7 @@
import androidx.test.filters.MediumTest
import androidx.ui.core.Alignment
import androidx.ui.core.PointerInputHandler
-import androidx.ui.core.PointerInputWrapper
+import androidx.ui.core.PointerInput
import androidx.ui.core.TestTag
import androidx.ui.core.WithDensity
import androidx.ui.core.gesture.DoubleTapGestureDetector
@@ -56,7 +56,7 @@
TestTag(tag) {
Semantics(container = true) {
DoubleTapGestureDetector( {
- PointerInputWrapper(pointerInputHandler = onPointerInput, cancelHandler = {}) {
+ PointerInput(pointerInputHandler = onPointerInput, cancelHandler = {}) {
WithDensity {
Container(width = width.toDp(), height = height.toDp()) {
DrawShape(RectangleShape, Color.Yellow)
diff --git a/ui/ui-test/src/androidTest/java/androidx/ui/test/SendLongClickTest.kt b/ui/ui-test/src/androidTest/java/androidx/ui/test/SendLongClickTest.kt
index 885b81f..7257caa 100644
--- a/ui/ui-test/src/androidTest/java/androidx/ui/test/SendLongClickTest.kt
+++ b/ui/ui-test/src/androidTest/java/androidx/ui/test/SendLongClickTest.kt
@@ -19,7 +19,7 @@
import androidx.compose.Composable
import androidx.test.filters.MediumTest
import androidx.ui.core.Alignment
-import androidx.ui.core.PointerInputWrapper
+import androidx.ui.core.PointerInput
import androidx.ui.core.TestTag
import androidx.ui.core.WithDensity
import androidx.ui.core.gesture.LongPressGestureDetector
@@ -56,7 +56,7 @@
TestTag(tag) {
Semantics(container = true) {
LongPressGestureDetector( {
- PointerInputWrapper(
+ PointerInput(
pointerInputHandler = recorder::onPointerInput,
cancelHandler = {}
) {
diff --git a/ui/ui-test/src/androidTest/java/androidx/ui/test/SendSwipeTest.kt b/ui/ui-test/src/androidTest/java/androidx/ui/test/SendSwipeTest.kt
index 4b82217..3584c5d 100644
--- a/ui/ui-test/src/androidTest/java/androidx/ui/test/SendSwipeTest.kt
+++ b/ui/ui-test/src/androidTest/java/androidx/ui/test/SendSwipeTest.kt
@@ -19,7 +19,7 @@
import androidx.compose.Composable
import androidx.test.filters.MediumTest
import androidx.ui.core.Alignment
-import androidx.ui.core.PointerInputWrapper
+import androidx.ui.core.PointerInput
import androidx.ui.foundation.shape.DrawShape
import androidx.ui.foundation.shape.RectangleShape
import androidx.ui.graphics.Color
@@ -59,7 +59,7 @@
fun Ui(alignment: Alignment) {
Align(alignment = alignment) {
Semantics(container = true, properties = { testTag = tag }) {
- PointerInputWrapper(
+ PointerInput(
pointerInputHandler = recorder::onPointerInput,
cancelHandler = {}
) {
diff --git a/ui/ui-test/src/androidTest/java/androidx/ui/test/SendSwipeVelocityTest.kt b/ui/ui-test/src/androidTest/java/androidx/ui/test/SendSwipeVelocityTest.kt
index f48ceae..85500e9 100644
--- a/ui/ui-test/src/androidTest/java/androidx/ui/test/SendSwipeVelocityTest.kt
+++ b/ui/ui-test/src/androidTest/java/androidx/ui/test/SendSwipeVelocityTest.kt
@@ -21,7 +21,7 @@
import androidx.test.filters.MediumTest
import androidx.ui.core.Alignment
import androidx.ui.core.Draw
-import androidx.ui.core.PointerInputWrapper
+import androidx.ui.core.PointerInput
import androidx.ui.core.WithDensity
import androidx.ui.geometry.Rect
import androidx.ui.graphics.Color
@@ -151,7 +151,7 @@
val paint = remember { Paint().apply { color = Color.Yellow } }
Align(alignment = Alignment.BottomRight) {
Semantics(container = true, properties = { testTag = tag }) {
- PointerInputWrapper(
+ PointerInput(
pointerInputHandler = recorder::onPointerInput,
cancelHandler = {}
) {