mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-29 17:23:23 +01:00
59 lines
4.3 KiB
Java
59 lines
4.3 KiB
Java
package androidx.compose.foundation.text.selection;
|
|
|
|
import androidx.compose.ui.geometry.Offset;
|
|
import androidx.compose.ui.geometry.OffsetKt;
|
|
import androidx.compose.ui.semantics.SemanticsPropertyKey;
|
|
import androidx.compose.ui.text.style.ResolvedTextDirection;
|
|
import androidx.compose.ui.unit.Dp;
|
|
import kotlin.Metadata;
|
|
import kotlin.jvm.functions.Function2;
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
import kotlin.jvm.internal.SourceDebugExtension;
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@Metadata(d1 = {"\u0000,\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0005\u001a\u001a\u0010\f\u001a\u00020\r2\u0006\u0010\u000e\u001a\u00020\rH\u0000ø\u0001\u0000¢\u0006\u0004\b\u000f\u0010\u0010\u001a\u0018\u0010\u0011\u001a\u00020\u00122\u0006\u0010\u0013\u001a\u00020\u00142\u0006\u0010\u0015\u001a\u00020\u0012H\u0000\u001a \u0010\u0016\u001a\u00020\u00122\u0006\u0010\u0017\u001a\u00020\u00122\u0006\u0010\u0013\u001a\u00020\u00142\u0006\u0010\u0018\u001a\u00020\u0012H\u0000\"\u0016\u0010\u0000\u001a\u00020\u0001X\u0080\u0004¢\u0006\n\n\u0002\u0010\u0004\u001a\u0004\b\u0002\u0010\u0003\"\u0016\u0010\u0005\u001a\u00020\u0001X\u0080\u0004¢\u0006\n\n\u0002\u0010\u0004\u001a\u0004\b\u0006\u0010\u0003\"\u001a\u0010\u0007\u001a\b\u0012\u0004\u0012\u00020\t0\bX\u0080\u0004¢\u0006\b\n\u0000\u001a\u0004\b\n\u0010\u000b\u0082\u0002\u0007\n\u0005\b¡\u001e0\u0001¨\u0006\u0019"}, d2 = {"HandleHeight", "Landroidx/compose/ui/unit/Dp;", "getHandleHeight", "()F", "F", "HandleWidth", "getHandleWidth", "SelectionHandleInfoKey", "Landroidx/compose/ui/semantics/SemanticsPropertyKey;", "Landroidx/compose/foundation/text/selection/SelectionHandleInfo;", "getSelectionHandleInfoKey", "()Landroidx/compose/ui/semantics/SemanticsPropertyKey;", "getAdjustedCoordinates", "Landroidx/compose/ui/geometry/Offset;", "position", "getAdjustedCoordinates-k-4lQ0M", "(J)J", "isHandleLtrDirection", "", "direction", "Landroidx/compose/ui/text/style/ResolvedTextDirection;", "areHandlesCrossed", "isLeftSelectionHandle", "isStartHandle", "handlesCrossed", "foundation_release"}, k = 2, mv = {1, 8, 0}, xi = 48)
|
|
@SourceDebugExtension({"SMAP\nSelectionHandles.kt\nKotlin\n*S Kotlin\n*F\n+ 1 SelectionHandles.kt\nandroidx/compose/foundation/text/selection/SelectionHandlesKt\n+ 2 Dp.kt\nandroidx/compose/ui/unit/DpKt\n*L\n1#1,169:1\n149#2:170\n149#2:171\n*S KotlinDebug\n*F\n+ 1 SelectionHandles.kt\nandroidx/compose/foundation/text/selection/SelectionHandlesKt\n*L\n36#1:170\n37#1:171\n*E\n"})
|
|
/* loaded from: classes.dex */
|
|
public final class SelectionHandlesKt {
|
|
private static final float HandleHeight;
|
|
private static final float HandleWidth;
|
|
|
|
@NotNull
|
|
private static final SemanticsPropertyKey<SelectionHandleInfo> SelectionHandleInfoKey = new SemanticsPropertyKey<>("SelectionHandleInfo", (Function2) null, 2, (DefaultConstructorMarker) null);
|
|
|
|
static {
|
|
float f = 25;
|
|
HandleWidth = Dp.m7368constructorimpl(f);
|
|
HandleHeight = Dp.m7368constructorimpl(f);
|
|
}
|
|
|
|
/* renamed from: getAdjustedCoordinates-k-4lQ0M, reason: not valid java name */
|
|
public static final long m1527getAdjustedCoordinatesk4lQ0M(long j) {
|
|
return OffsetKt.Offset(Offset.m4400getXimpl(j), Offset.m4401getYimpl(j) - 1.0f);
|
|
}
|
|
|
|
public static final float getHandleHeight() {
|
|
return HandleHeight;
|
|
}
|
|
|
|
public static final float getHandleWidth() {
|
|
return HandleWidth;
|
|
}
|
|
|
|
@NotNull
|
|
public static final SemanticsPropertyKey<SelectionHandleInfo> getSelectionHandleInfoKey() {
|
|
return SelectionHandleInfoKey;
|
|
}
|
|
|
|
public static final boolean isHandleLtrDirection(@NotNull ResolvedTextDirection resolvedTextDirection, boolean z) {
|
|
if (resolvedTextDirection != ResolvedTextDirection.Ltr || z) {
|
|
return resolvedTextDirection == ResolvedTextDirection.Rtl && z;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
public static final boolean isLeftSelectionHandle(boolean z, @NotNull ResolvedTextDirection resolvedTextDirection, boolean z2) {
|
|
return z ? isHandleLtrDirection(resolvedTextDirection, z2) : !isHandleLtrDirection(resolvedTextDirection, z2);
|
|
}
|
|
}
|