mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-15 18:37:17 +01:00
228 lines
12 KiB
Java
228 lines
12 KiB
Java
package androidx.compose.ui.layout;
|
|
|
|
import androidx.compose.runtime.Stable;
|
|
import androidx.compose.ui.geometry.Rect;
|
|
import androidx.compose.ui.internal.InlineClassHelperKt;
|
|
import androidx.compose.ui.layout.Placeable;
|
|
import androidx.compose.ui.node.LookaheadCapablePlaceable;
|
|
import androidx.compose.ui.unit.DpRect;
|
|
import androidx.core.view.ViewCompat;
|
|
import java.util.Map;
|
|
import kotlin.Metadata;
|
|
import kotlin.Unit;
|
|
import kotlin.collections.MapsKt;
|
|
import kotlin.jvm.functions.Function1;
|
|
import kotlin.jvm.internal.SourceDebugExtension;
|
|
import okio.Buffer$$ExternalSyntheticBUOutline0;
|
|
import org.jetbrains.annotations.NotNull;
|
|
import org.jetbrains.annotations.Nullable;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@MeasureScopeMarker
|
|
@Metadata(d1 = {"\u0000:\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0010$\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\bg\u0018\u00002\u00020\u0001JG\u0010\u0002\u001a\u00020\u00032\u0006\u0010\u0004\u001a\u00020\u00052\u0006\u0010\u0006\u001a\u00020\u00052\u0014\b\u0002\u0010\u0007\u001a\u000e\u0012\u0004\u0012\u00020\t\u0012\u0004\u0012\u00020\u00050\b2\u0017\u0010\n\u001a\u0013\u0012\u0004\u0012\u00020\f\u0012\u0004\u0012\u00020\r0\u000b¢\u0006\u0002\b\u000eH\u0016Jd\u0010\u0002\u001a\u00020\u00032\u0006\u0010\u0004\u001a\u00020\u00052\u0006\u0010\u0006\u001a\u00020\u00052\u0014\b\u0002\u0010\u0007\u001a\u000e\u0012\u0004\u0012\u00020\t\u0012\u0004\u0012\u00020\u00050\b2\u001b\b\u0002\u0010\u000f\u001a\u0015\u0012\u0004\u0012\u00020\u0010\u0012\u0004\u0012\u00020\r\u0018\u00010\u000b¢\u0006\u0002\b\u000e2\u0017\u0010\n\u001a\u0013\u0012\u0004\u0012\u00020\f\u0012\u0004\u0012\u00020\r0\u000b¢\u0006\u0002\b\u000eH\u0016ø\u0001\u0000\u0082\u0002\u0006\n\u0004\b!0\u0001¨\u0006\u0011À\u0006\u0003"}, d2 = {"Landroidx/compose/ui/layout/MeasureScope;", "Landroidx/compose/ui/layout/IntrinsicMeasureScope;", "layout", "Landroidx/compose/ui/layout/MeasureResult;", "width", "", "height", "alignmentLines", "", "Landroidx/compose/ui/layout/AlignmentLine;", "placementBlock", "Lkotlin/Function1;", "Landroidx/compose/ui/layout/Placeable$PlacementScope;", "", "Lkotlin/ExtensionFunctionType;", "rulers", "Landroidx/compose/ui/layout/RulerScope;", "ui_release"}, k = 1, mv = {2, 0, 0}, xi = 48)
|
|
@SourceDebugExtension({"SMAP\nMeasureScope.kt\nKotlin\n*S Kotlin\n*F\n+ 1 MeasureScope.kt\nandroidx/compose/ui/layout/MeasureScope\n+ 2 LookaheadDelegate.kt\nandroidx/compose/ui/node/LookaheadDelegateKt\n+ 3 InlineClassHelper.kt\nandroidx/compose/ui/internal/InlineClassHelperKt\n*L\n1#1,131:1\n394#2:132\n395#2,2:135\n398#2:138\n57#3,2:133\n60#3:137\n*S KotlinDebug\n*F\n+ 1 MeasureScope.kt\nandroidx/compose/ui/layout/MeasureScope\n*L\n76#1:132\n76#1:135,2\n76#1:138\n76#1:133,2\n76#1:137\n*E\n"})
|
|
/* loaded from: classes13.dex */
|
|
public interface MeasureScope extends IntrinsicMeasureScope {
|
|
static /* synthetic */ MeasureResult layout$default(MeasureScope measureScope, int i, int i2, Map map, Function1 function1, Function1 function12, int i3, Object obj) {
|
|
if (obj != null) {
|
|
Buffer$$ExternalSyntheticBUOutline0.m$1("Super calls with default arguments not supported in this target, function: layout");
|
|
return null;
|
|
}
|
|
if ((i3 & 4) != 0) {
|
|
map = MapsKt.emptyMap();
|
|
}
|
|
Map map2 = map;
|
|
if ((i3 & 8) != 0) {
|
|
function1 = null;
|
|
}
|
|
return measureScope.layout(i, i2, map2, function1, function12);
|
|
}
|
|
|
|
@NotNull
|
|
default MeasureResult layout(final int width, final int height, @NotNull final Map<AlignmentLine, Integer> alignmentLines, @Nullable final Function1<? super RulerScope, Unit> rulers, @NotNull final Function1<? super Placeable.PlacementScope, Unit> placementBlock) {
|
|
if (!((width & ViewCompat.MEASURED_STATE_MASK) == 0 && ((-16777216) & height) == 0)) {
|
|
InlineClassHelperKt.throwIllegalStateException("Size(" + width + " x " + height + ") is out of range. Each dimension must be between 0 and 16777215.");
|
|
}
|
|
return new MeasureResult(width, height, alignmentLines, rulers, this, placementBlock) { // from class: androidx.compose.ui.layout.MeasureScope$layout$1
|
|
final /* synthetic */ Function1<Placeable.PlacementScope, Unit> $placementBlock;
|
|
final /* synthetic */ int $width;
|
|
private final Map<AlignmentLine, Integer> alignmentLines;
|
|
private final int height;
|
|
private final Function1<RulerScope, Unit> rulers;
|
|
final /* synthetic */ MeasureScope this$0;
|
|
private final int width;
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
{
|
|
this.$width = width;
|
|
this.this$0 = this;
|
|
this.$placementBlock = placementBlock;
|
|
this.width = width;
|
|
this.height = height;
|
|
this.alignmentLines = alignmentLines;
|
|
this.rulers = rulers;
|
|
}
|
|
|
|
@Override // androidx.compose.ui.layout.MeasureResult
|
|
public Map<AlignmentLine, Integer> getAlignmentLines() {
|
|
return this.alignmentLines;
|
|
}
|
|
|
|
@Override // androidx.compose.ui.layout.MeasureResult
|
|
public int getHeight() {
|
|
return this.height;
|
|
}
|
|
|
|
@Override // androidx.compose.ui.layout.MeasureResult
|
|
public Function1<RulerScope, Unit> getRulers() {
|
|
return this.rulers;
|
|
}
|
|
|
|
@Override // androidx.compose.ui.layout.MeasureResult
|
|
public int getWidth() {
|
|
return this.width;
|
|
}
|
|
|
|
@Override // androidx.compose.ui.layout.MeasureResult
|
|
public void placeChildren() {
|
|
MeasureScope measureScope = this.this$0;
|
|
boolean z = measureScope instanceof LookaheadCapablePlaceable;
|
|
Function1<Placeable.PlacementScope, Unit> function1 = this.$placementBlock;
|
|
if (z) {
|
|
function1.invoke(((LookaheadCapablePlaceable) measureScope).getPlacementScope());
|
|
} else {
|
|
function1.invoke(new SimplePlacementScope(this.$width, this.this$0.getLayoutDirection(), this.this$0.getDensity(), this.this$0.getFontScale()));
|
|
}
|
|
}
|
|
};
|
|
}
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@Metadata(k = 3, mv = {2, 0, 0}, xi = 48)
|
|
public static final class DefaultImpls {
|
|
@Deprecated
|
|
public static boolean isLookingAhead(@NotNull MeasureScope measureScope) {
|
|
return MeasureScope.super.isLookingAhead();
|
|
}
|
|
|
|
@Deprecated
|
|
@NotNull
|
|
public static MeasureResult layout(@NotNull MeasureScope measureScope, int i, int i2, @NotNull Map<AlignmentLine, Integer> map, @NotNull Function1<? super Placeable.PlacementScope, Unit> function1) {
|
|
return MeasureScope.super.layout(i, i2, map, function1);
|
|
}
|
|
|
|
@Stable
|
|
@Deprecated
|
|
/* renamed from: roundToPx--R2X_6o, reason: not valid java name */
|
|
public static int m6114roundToPxR2X_6o(@NotNull MeasureScope measureScope, long j) {
|
|
return MeasureScope.super.mo550roundToPxR2X_6o(j);
|
|
}
|
|
|
|
@Stable
|
|
@Deprecated
|
|
/* renamed from: roundToPx-0680j_4, reason: not valid java name */
|
|
public static int m6115roundToPx0680j_4(@NotNull MeasureScope measureScope, float f) {
|
|
return MeasureScope.super.mo551roundToPx0680j_4(f);
|
|
}
|
|
|
|
@Stable
|
|
@Deprecated
|
|
/* renamed from: toDp-GaN1DYA, reason: not valid java name */
|
|
public static float m6116toDpGaN1DYA(@NotNull MeasureScope measureScope, long j) {
|
|
return MeasureScope.super.mo552toDpGaN1DYA(j);
|
|
}
|
|
|
|
@Stable
|
|
@Deprecated
|
|
/* renamed from: toDp-u2uoSUM, reason: not valid java name */
|
|
public static float m6117toDpu2uoSUM(@NotNull MeasureScope measureScope, float f) {
|
|
return MeasureScope.super.mo553toDpu2uoSUM(f);
|
|
}
|
|
|
|
@Stable
|
|
@Deprecated
|
|
/* renamed from: toDpSize-k-rfVVM, reason: not valid java name */
|
|
public static long m6119toDpSizekrfVVM(@NotNull MeasureScope measureScope, long j) {
|
|
return MeasureScope.super.mo555toDpSizekrfVVM(j);
|
|
}
|
|
|
|
@Stable
|
|
@Deprecated
|
|
/* renamed from: toPx--R2X_6o, reason: not valid java name */
|
|
public static float m6120toPxR2X_6o(@NotNull MeasureScope measureScope, long j) {
|
|
return MeasureScope.super.mo556toPxR2X_6o(j);
|
|
}
|
|
|
|
@Stable
|
|
@Deprecated
|
|
/* renamed from: toPx-0680j_4, reason: not valid java name */
|
|
public static float m6121toPx0680j_4(@NotNull MeasureScope measureScope, float f) {
|
|
return MeasureScope.super.mo557toPx0680j_4(f);
|
|
}
|
|
|
|
@Stable
|
|
@Deprecated
|
|
@NotNull
|
|
public static Rect toRect(@NotNull MeasureScope measureScope, @NotNull DpRect dpRect) {
|
|
return MeasureScope.super.toRect(dpRect);
|
|
}
|
|
|
|
@Stable
|
|
@Deprecated
|
|
/* renamed from: toSize-XkaWNTQ, reason: not valid java name */
|
|
public static long m6122toSizeXkaWNTQ(@NotNull MeasureScope measureScope, long j) {
|
|
return MeasureScope.super.mo558toSizeXkaWNTQ(j);
|
|
}
|
|
|
|
@Stable
|
|
@Deprecated
|
|
/* renamed from: toSp-0xMU5do, reason: not valid java name */
|
|
public static long m6123toSp0xMU5do(@NotNull MeasureScope measureScope, float f) {
|
|
return MeasureScope.super.mo559toSp0xMU5do(f);
|
|
}
|
|
|
|
@Stable
|
|
@Deprecated
|
|
/* renamed from: toSp-kPz2Gy4, reason: not valid java name */
|
|
public static long m6124toSpkPz2Gy4(@NotNull MeasureScope measureScope, float f) {
|
|
return MeasureScope.super.mo560toSpkPz2Gy4(f);
|
|
}
|
|
|
|
@Deprecated
|
|
@NotNull
|
|
public static MeasureResult layout(@NotNull MeasureScope measureScope, int i, int i2, @NotNull Map<AlignmentLine, Integer> map, @Nullable Function1<? super RulerScope, Unit> function1, @NotNull Function1<? super Placeable.PlacementScope, Unit> function12) {
|
|
return MeasureScope.super.layout(i, i2, map, function1, function12);
|
|
}
|
|
|
|
@Stable
|
|
@Deprecated
|
|
/* renamed from: toDp-u2uoSUM, reason: not valid java name */
|
|
public static float m6118toDpu2uoSUM(@NotNull MeasureScope measureScope, int i) {
|
|
return MeasureScope.super.mo554toDpu2uoSUM(i);
|
|
}
|
|
|
|
@Stable
|
|
@Deprecated
|
|
/* renamed from: toSp-kPz2Gy4, reason: not valid java name */
|
|
public static long m6125toSpkPz2Gy4(@NotNull MeasureScope measureScope, int i) {
|
|
return MeasureScope.super.mo561toSpkPz2Gy4(i);
|
|
}
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
static /* synthetic */ MeasureResult layout$default(MeasureScope measureScope, int i, int i2, Map map, Function1 function1, int i3, Object obj) {
|
|
if (obj != null) {
|
|
Buffer$$ExternalSyntheticBUOutline0.m$1("Super calls with default arguments not supported in this target, function: layout");
|
|
return null;
|
|
}
|
|
if ((i3 & 4) != 0) {
|
|
map = MapsKt.emptyMap();
|
|
}
|
|
return measureScope.layout(i, i2, map, function1);
|
|
}
|
|
|
|
@NotNull
|
|
default MeasureResult layout(int width, int height, @NotNull Map<AlignmentLine, Integer> alignmentLines, @NotNull Function1<? super Placeable.PlacementScope, Unit> placementBlock) {
|
|
return layout(width, height, alignmentLines, null, placementBlock);
|
|
}
|
|
}
|