Make ColorSet and ColorList internal
Fixes: b/307312080
Relnote: Make ColorList and ColorSet collections internal
Test: Verified usage in demo app
Change-Id: I9b1829d56f377c4b692b6f0140eb26f4ca1d7482
diff --git a/collection/collection/template/generateValueClassCollections.sh b/collection/collection/template/generateValueClassCollections.sh
index 0ee3cd9..8aef3cf8 100755
--- a/collection/collection/template/generateValueClassCollections.sh
+++ b/collection/collection/template/generateValueClassCollections.sh
@@ -2,6 +2,14 @@
# To add another value class to generate, add a new value to the end of each of these lists.
+# TODO For Color collections, we don't want to expose them until there's a public API exposure,
+# or if there's a lot of duplicate copies generated internally.
+# When we do want to have one single public instance of the Color collections,
+# It should be hosted in the targetPackage "androidx.compose.ui.graphics" package
+# with visibility "public" located at outputDirectory
+# "../../../compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics"
+# Until then, there should be no issue with having a couple internal instances.
+
# The value class to generate collections for (e.g. Color or Offset).
valueClasses=(
"Color"
@@ -9,7 +17,7 @@
# The destination package for the collection classes.
targetPackages=(
- "androidx.compose.ui.graphics"
+ "androidx.compose.foundation.demos.collection"
)
# The backing field in the value class that converts it to a primitive (e.g. packedValue).
@@ -29,7 +37,7 @@
# The visibility of the top-level classes and functions (e.g. public or internal)
visibilities=(
- "public"
+ "internal"
)
# The package in which the value class resides (e.g. androidx.compose.ui.ui.collection).
@@ -39,7 +47,7 @@
# Where the resulting files are output, relative to the directory this script is in.
outputDirectories=(
- "../../../compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics"
+ "../../../compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/collection"
)
scriptDir=$(dirname "${PWD}/${0}")
@@ -58,7 +66,9 @@
firstLower=$(echo "${class:0:1}" | tr '[:upper:]' '[:lower:]')
lowerCaseClass="${firstLower}${class:1}"
- outputSetPath=$(realpath "${scriptDir}/${outputDirectory}/${class}Set.kt")
+ realOutputDirectory="$(realpath "${scriptDir}/${outputDirectory}")"
+
+ outputSetPath="${realOutputDirectory}/${class}Set.kt"
echo "generating ${outputSetPath}"
sed -e "s/PACKAGE/${targetPackage}/" -e "s/VALUE_CLASS/${class}/g" \
-e "s/vALUE_CLASS/${lowerCaseClass}/g" -e "s/BACKING_PROPERTY/${backingProperty}/g" \
@@ -67,7 +77,7 @@
"${scriptDir}/ValueClassSet.kt.template" \
> "${outputSetPath}"
- outputListPath=$(realpath "${scriptDir}/${outputDirectory}/${class}List.kt")
+ outputListPath="${realOutputDirectory}/${class}List.kt"
echo "generating ${outputListPath}"
sed -e "s/PACKAGE/${targetPackage}/" -e "s/VALUE_CLASS/${class}/g" \
-e "s/vALUE_CLASS/${lowerCaseClass}/g" -e "s/BACKING_PROPERTY/${backingProperty}/g" \
diff --git a/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/ColorList.kt b/compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/collection/ColorList.kt
similarity index 97%
rename from compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/ColorList.kt
rename to compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/collection/ColorList.kt
index fe5aae1..e8ce3d3 100644
--- a/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/ColorList.kt
+++ b/compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/collection/ColorList.kt
@@ -28,7 +28,7 @@
"ktlint:standard:no-unused-imports",
)
-package androidx.compose.ui.graphics
+package androidx.compose.foundation.demos.collection
import androidx.collection.LongList
import androidx.collection.MutableLongList
@@ -61,7 +61,7 @@
*/
@OptIn(ExperimentalContracts::class)
@JvmInline
-public value class ColorList(val list: LongList) {
+internal value class ColorList(val list: LongList) {
/**
* The number of elements in the [ColorList].
*/
@@ -381,7 +381,7 @@
*/
@OptIn(ExperimentalContracts::class)
@JvmInline
-public value class MutableColorList(val list: MutableLongList) {
+internal value class MutableColorList(val list: MutableLongList) {
public constructor(initialCapacity: Int = 16) : this(MutableLongList(initialCapacity))
/**
@@ -856,23 +856,23 @@
/**
* @return a read-only [ColorList] with nothing in it.
*/
-public inline fun emptyColorList(): ColorList = ColorList(emptyLongList())
+internal inline fun emptyColorList(): ColorList = ColorList(emptyLongList())
/**
* @return a read-only [ColorList] with nothing in it.
*/
-public inline fun colorListOf(): ColorList = ColorList(emptyLongList())
+internal inline fun colorListOf(): ColorList = ColorList(emptyLongList())
/**
* @return a new read-only [ColorList] with [element1] as the only item in the list.
*/
-public inline fun colorListOf(element1: Color): ColorList =
+internal inline fun colorListOf(element1: Color): ColorList =
ColorList(mutableLongListOf(element1.value.toLong()))
/**
* @return a new read-only [ColorList] with 2 elements, [element1] and [element2], in order.
*/
-public inline fun colorListOf(element1: Color, element2: Color): ColorList =
+internal inline fun colorListOf(element1: Color, element2: Color): ColorList =
ColorList(
mutableLongListOf(
element1.value.toLong(),
@@ -884,7 +884,7 @@
* @return a new read-only [ColorList] with 3 elements, [element1], [element2], and [element3],
* in order.
*/
-public inline fun colorListOf(
+internal inline fun colorListOf(
element1: Color,
element2: Color,
element3: Color
@@ -899,19 +899,19 @@
/**
* @return a new empty [MutableColorList] with the default capacity.
*/
-public inline fun mutableColorListOf(): MutableColorList =
+internal inline fun mutableColorListOf(): MutableColorList =
MutableColorList(MutableLongList())
/**
* @return a new [MutableColorList] with [element1] as the only item in the list.
*/
-public inline fun mutableColorListOf(element1: Color): MutableColorList =
+internal inline fun mutableColorListOf(element1: Color): MutableColorList =
MutableColorList(mutableLongListOf(element1.value.toLong()))
/**
* @return a new [MutableColorList] with 2 elements, [element1] and [element2], in order.
*/
-public inline fun mutableColorListOf(
+internal inline fun mutableColorListOf(
element1: Color,
element2: Color
): MutableColorList = MutableColorList(
@@ -925,7 +925,7 @@
* @return a new [MutableColorList] with 3 elements, [element1], [element2], and [element3],
* in order.
*/
-public inline fun mutableColorListOf(
+internal inline fun mutableColorListOf(
element1: Color,
element2: Color,
element3: Color
diff --git a/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/ColorSet.kt b/compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/collection/ColorSet.kt
similarity index 96%
rename from compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/ColorSet.kt
rename to compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/collection/ColorSet.kt
index eb6a001..de673b8 100644
--- a/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/ColorSet.kt
+++ b/compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/collection/ColorSet.kt
@@ -28,7 +28,7 @@
"ktlint:standard:no-unused-imports",
)
-package androidx.compose.ui.graphics
+package androidx.compose.foundation.demos.collection
import androidx.collection.LongSet
import androidx.collection.MutableLongSet
@@ -51,24 +51,24 @@
/**
* Returns an empty, read-only [ColorSet].
*/
-public inline fun emptyColorSet(): ColorSet = ColorSet(emptyLongSet())
+internal inline fun emptyColorSet(): ColorSet = ColorSet(emptyLongSet())
/**
* Returns an empty, read-only [ColorSet].
*/
-public inline fun colorSetOf(): ColorSet = ColorSet(emptyLongSet())
+internal inline fun colorSetOf(): ColorSet = ColorSet(emptyLongSet())
/**
* Returns a new read-only [ColorSet] with only [element1] in it.
*/
-public inline fun colorSetOf(element1: Color): ColorSet =
+internal inline fun colorSetOf(element1: Color): ColorSet =
ColorSet(mutableLongSetOf(element1.value.toLong()))
/**
* Returns a new read-only [ColorSet] with only [element1] and [element2] in it.
*/
@Suppress("UNCHECKED_CAST")
-public fun colorSetOf(
+internal fun colorSetOf(
element1: Color,
element2: Color
): ColorSet =
@@ -83,7 +83,7 @@
* Returns a new read-only [ColorSet] with only [element1], [element2], and [element3] in it.
*/
@Suppress("UNCHECKED_CAST")
-public fun colorSetOf(
+internal fun colorSetOf(
element1: Color,
element2: Color,
element3: Color
@@ -98,20 +98,20 @@
/**
* Returns a new [MutableColorSet].
*/
-public fun mutableColorSetOf(): MutableColorSet = MutableColorSet(
+internal fun mutableColorSetOf(): MutableColorSet = MutableColorSet(
MutableLongSet()
)
/**
* Returns a new [MutableColorSet] with only [element1] in it.
*/
-public fun mutableColorSetOf(element1: Color): MutableColorSet =
+internal fun mutableColorSetOf(element1: Color): MutableColorSet =
MutableColorSet(mutableLongSetOf(element1.value.toLong()))
/**
* Returns a new [MutableColorSet] with only [element1] and [element2] in it.
*/
-public fun mutableColorSetOf(
+internal fun mutableColorSetOf(
element1: Color,
element2: Color
): MutableColorSet =
@@ -125,7 +125,7 @@
/**
* Returns a new [MutableColorSet] with only [element1], [element2], and [element3] in it.
*/
-public fun mutableColorSetOf(
+internal fun mutableColorSetOf(
element1: Color,
element2: Color,
element3: Color
@@ -155,7 +155,7 @@
*/
@OptIn(ExperimentalContracts::class)
@JvmInline
-public value class ColorSet(val set: LongSet) {
+internal value class ColorSet(val set: LongSet) {
/**
* Returns the number of elements that can be stored in this set
* without requiring internal storage reallocation.
@@ -306,7 +306,7 @@
*/
@OptIn(ExperimentalContracts::class)
@JvmInline
-public value class MutableColorSet(val set: MutableLongSet) {
+internal value class MutableColorSet(val set: MutableLongSet) {
/**
* Returns the number of elements that can be stored in this set
* without requiring internal storage reallocation.
diff --git a/compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/ComposeMinTouchTargetTextSelectionDemo.kt b/compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/ComposeMinTouchTargetTextSelectionDemo.kt
index fb8c403..d5cf31a 100644
--- a/compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/ComposeMinTouchTargetTextSelectionDemo.kt
+++ b/compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/ComposeMinTouchTargetTextSelectionDemo.kt
@@ -17,6 +17,7 @@
package androidx.compose.foundation.demos.text
import androidx.compose.foundation.border
+import androidx.compose.foundation.demos.collection.MutableColorList
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
@@ -38,7 +39,6 @@
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.geometry.Size
import androidx.compose.ui.graphics.Color
-import androidx.compose.ui.graphics.MutableColorList
import androidx.compose.ui.graphics.drawscope.Stroke
import androidx.compose.ui.platform.LocalViewConfiguration
import androidx.compose.ui.platform.ViewConfiguration
diff --git a/compose/ui/ui-graphics/api/current.txt b/compose/ui/ui-graphics/api/current.txt
index f4d14aa..af6d7cc 100644
--- a/compose/ui/ui-graphics/api/current.txt
+++ b/compose/ui/ui-graphics/api/current.txt
@@ -390,60 +390,6 @@
method @ColorInt @androidx.compose.runtime.Stable public static int toArgb(long);
}
- @kotlin.jvm.JvmInline public final value class ColorList {
- ctor public ColorList(androidx.collection.LongList list);
- method public inline boolean any();
- method public inline boolean any(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,java.lang.Boolean> predicate);
- method public inline operator boolean contains(long element);
- method public inline boolean containsAll(androidx.collection.LongList elements);
- method public inline boolean containsAll(androidx.collection.MutableLongList elements);
- method public inline int count();
- method public inline int count(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,java.lang.Boolean> predicate);
- method public inline long elementAt(@IntRange(from=0L) int index);
- method public inline long elementAtOrElse(@IntRange(from=0L) int index, kotlin.jvm.functions.Function1<? super java.lang.Integer,androidx.compose.ui.graphics.Color> defaultValue);
- method public inline long first();
- method public inline long first(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,java.lang.Boolean> predicate);
- method public inline <R> R fold(R initial, kotlin.jvm.functions.Function2<? super R,? super androidx.compose.ui.graphics.Color,? extends R> operation);
- method public inline <R> R foldIndexed(R initial, kotlin.jvm.functions.Function3<? super java.lang.Integer,? super R,? super androidx.compose.ui.graphics.Color,? extends R> operation);
- method public inline <R> R foldRight(R initial, kotlin.jvm.functions.Function2<? super androidx.compose.ui.graphics.Color,? super R,? extends R> operation);
- method public inline <R> R foldRightIndexed(R initial, kotlin.jvm.functions.Function3<? super java.lang.Integer,? super androidx.compose.ui.graphics.Color,? super R,? extends R> operation);
- method public inline void forEach(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,kotlin.Unit> block);
- method public inline void forEachIndexed(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super androidx.compose.ui.graphics.Color,kotlin.Unit> block);
- method public inline void forEachReversed(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,kotlin.Unit> block);
- method public inline void forEachReversedIndexed(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super androidx.compose.ui.graphics.Color,kotlin.Unit> block);
- method public inline operator long get(@IntRange(from=0L) int index);
- method public inline kotlin.ranges.IntRange getIndices();
- method @IntRange(from=-1L) public inline int getLastIndex();
- method public androidx.collection.LongList getList();
- method @IntRange(from=0L) public inline int getSize();
- method public inline int indexOf(long element);
- method public inline int indexOfFirst(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,java.lang.Boolean> predicate);
- method public inline int indexOfLast(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,java.lang.Boolean> predicate);
- method public inline boolean isEmpty();
- method public inline boolean isNotEmpty();
- method public inline long last();
- method public inline long last(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,java.lang.Boolean> predicate);
- method public inline int lastIndexOf(long element);
- method public inline boolean none();
- method public inline boolean reversedAny(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,java.lang.Boolean> predicate);
- property public final inline kotlin.ranges.IntRange indices;
- property @IntRange(from=-1L) public final inline int lastIndex;
- property public final androidx.collection.LongList list;
- property @IntRange(from=0L) public final inline int size;
- }
-
- public final class ColorListKt {
- method public static inline androidx.collection.LongList colorListOf();
- method public static inline androidx.collection.LongList colorListOf(long element1);
- method public static inline androidx.collection.LongList colorListOf(long element1, long element2);
- method public static inline androidx.collection.LongList colorListOf(long element1, long element2, long element3);
- method public static inline androidx.collection.LongList emptyColorList();
- method public static inline androidx.collection.MutableLongList mutableColorListOf();
- method public static inline androidx.collection.MutableLongList mutableColorListOf(long element1);
- method public static inline androidx.collection.MutableLongList mutableColorListOf(long element1, long element2);
- method public static inline androidx.collection.MutableLongList mutableColorListOf(long element1, long element2, long element3);
- }
-
@kotlin.jvm.JvmInline public final value class ColorMatrix {
ctor public ColorMatrix(optional float[] values);
method public void convertRgbToYuv();
@@ -471,40 +417,6 @@
method public operator long invoke();
}
- @kotlin.jvm.JvmInline public final value class ColorSet {
- ctor public ColorSet(androidx.collection.LongSet set);
- method public inline boolean all(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,java.lang.Boolean> predicate);
- method public inline boolean any();
- method public inline boolean any(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,java.lang.Boolean> predicate);
- method public inline operator boolean contains(long element);
- method @IntRange(from=0L) public inline int count();
- method @IntRange(from=0L) public inline int count(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,java.lang.Boolean> predicate);
- method public inline long first();
- method public inline long first(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,java.lang.Boolean> predicate);
- method public inline void forEach(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,kotlin.Unit> block);
- method @IntRange(from=0L) public inline int getCapacity();
- method public androidx.collection.LongSet getSet();
- method @IntRange(from=0L) public inline int getSize();
- method public inline boolean isEmpty();
- method public inline boolean isNotEmpty();
- method public inline boolean none();
- property @IntRange(from=0L) public final inline int capacity;
- property public final androidx.collection.LongSet set;
- property @IntRange(from=0L) public final inline int size;
- }
-
- public final class ColorSetKt {
- method public static inline androidx.collection.LongSet colorSetOf();
- method public static inline androidx.collection.LongSet colorSetOf(long element1);
- method public static androidx.collection.LongSet colorSetOf(long element1, long element2);
- method public static androidx.collection.LongSet colorSetOf(long element1, long element2, long element3);
- method public static inline androidx.collection.LongSet emptyColorSet();
- method public static androidx.collection.MutableLongSet mutableColorSetOf();
- method public static androidx.collection.MutableLongSet mutableColorSetOf(long element1);
- method public static androidx.collection.MutableLongSet mutableColorSetOf(long element1, long element2);
- method public static androidx.collection.MutableLongSet mutableColorSetOf(long element1, long element2, long element3);
- }
-
@SuppressCompatibility @kotlin.RequiresOptIn(message="This API is experimental and is likely to change in the future.") @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) public @interface ExperimentalGraphicsApi {
}
@@ -620,113 +532,6 @@
method public static boolean isIdentity(float[]);
}
- @kotlin.jvm.JvmInline public final value class MutableColorList {
- ctor public MutableColorList(androidx.collection.MutableLongList list);
- ctor public MutableColorList(optional int initialCapacity);
- method public inline void add(@IntRange(from=0L) int index, long element);
- method public inline boolean add(long element);
- method public inline boolean addAll(androidx.collection.LongList elements);
- method public inline boolean addAll(androidx.collection.MutableLongList elements);
- method public inline boolean addAll(@IntRange(from=0L) int index, androidx.collection.LongList elements);
- method public inline boolean addAll(@IntRange(from=0L) int index, androidx.collection.MutableLongList elements);
- method public inline boolean any();
- method public inline boolean any(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,java.lang.Boolean> predicate);
- method public inline androidx.collection.LongList asColorList();
- method public inline void clear();
- method public inline operator boolean contains(long element);
- method public inline boolean containsAll(androidx.collection.LongList elements);
- method public inline boolean containsAll(androidx.collection.MutableLongList elements);
- method public inline int count();
- method public inline int count(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,java.lang.Boolean> predicate);
- method public inline long elementAt(@IntRange(from=0L) int index);
- method public inline long elementAtOrElse(@IntRange(from=0L) int index, kotlin.jvm.functions.Function1<? super java.lang.Integer,androidx.compose.ui.graphics.Color> defaultValue);
- method public inline void ensureCapacity(int capacity);
- method public inline long first();
- method public inline long first(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,java.lang.Boolean> predicate);
- method public inline <R> R fold(R initial, kotlin.jvm.functions.Function2<? super R,? super androidx.compose.ui.graphics.Color,? extends R> operation);
- method public inline <R> R foldIndexed(R initial, kotlin.jvm.functions.Function3<? super java.lang.Integer,? super R,? super androidx.compose.ui.graphics.Color,? extends R> operation);
- method public inline <R> R foldRight(R initial, kotlin.jvm.functions.Function2<? super androidx.compose.ui.graphics.Color,? super R,? extends R> operation);
- method public inline <R> R foldRightIndexed(R initial, kotlin.jvm.functions.Function3<? super java.lang.Integer,? super androidx.compose.ui.graphics.Color,? super R,? extends R> operation);
- method public inline void forEach(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,kotlin.Unit> block);
- method public inline void forEachIndexed(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super androidx.compose.ui.graphics.Color,kotlin.Unit> block);
- method public inline void forEachReversed(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,kotlin.Unit> block);
- method public inline void forEachReversedIndexed(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super androidx.compose.ui.graphics.Color,kotlin.Unit> block);
- method public inline operator long get(@IntRange(from=0L) int index);
- method public inline int getCapacity();
- method public inline kotlin.ranges.IntRange getIndices();
- method @IntRange(from=-1L) public inline int getLastIndex();
- method public androidx.collection.MutableLongList getList();
- method @IntRange(from=0L) public inline int getSize();
- method public inline int indexOf(long element);
- method public inline int indexOfFirst(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,java.lang.Boolean> predicate);
- method public inline int indexOfLast(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,java.lang.Boolean> predicate);
- method public inline boolean isEmpty();
- method public inline boolean isNotEmpty();
- method public inline long last();
- method public inline long last(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,java.lang.Boolean> predicate);
- method public inline int lastIndexOf(long element);
- method public inline operator void minusAssign(androidx.collection.LongList elements);
- method public inline operator void minusAssign(androidx.collection.MutableLongList elements);
- method public inline operator void minusAssign(long element);
- method public inline boolean none();
- method public inline operator void plusAssign(androidx.collection.LongList elements);
- method public inline operator void plusAssign(androidx.collection.MutableLongList elements);
- method public inline operator void plusAssign(long element);
- method public inline boolean remove(long element);
- method public inline boolean removeAll(androidx.collection.LongList elements);
- method public inline boolean removeAll(androidx.collection.MutableLongList elements);
- method public inline long removeAt(@IntRange(from=0L) int index);
- method public inline void removeRange(@IntRange(from=0L) int start, @IntRange(from=0L) int end);
- method public inline boolean retainAll(androidx.collection.LongList elements);
- method public inline boolean retainAll(androidx.collection.MutableLongList elements);
- method public inline boolean reversedAny(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,java.lang.Boolean> predicate);
- method public inline operator long set(@IntRange(from=0L) int index, long element);
- method public inline void trim(optional int minCapacity);
- property public final inline int capacity;
- property public final inline kotlin.ranges.IntRange indices;
- property @IntRange(from=-1L) public final inline int lastIndex;
- property public final androidx.collection.MutableLongList list;
- property @IntRange(from=0L) public final inline int size;
- }
-
- @kotlin.jvm.JvmInline public final value class MutableColorSet {
- ctor public MutableColorSet(androidx.collection.MutableLongSet set);
- ctor public MutableColorSet(optional int initialCapacity);
- method public inline boolean add(long element);
- method public inline boolean addAll(androidx.collection.LongSet elements);
- method public inline boolean addAll(androidx.collection.MutableLongSet elements);
- method public inline boolean all(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,java.lang.Boolean> predicate);
- method public inline boolean any();
- method public inline boolean any(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,java.lang.Boolean> predicate);
- method public inline androidx.collection.LongSet asColorSet();
- method public inline void clear();
- method public inline operator boolean contains(long element);
- method @IntRange(from=0L) public inline int count();
- method @IntRange(from=0L) public inline int count(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,java.lang.Boolean> predicate);
- method public inline long first();
- method public inline long first(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,java.lang.Boolean> predicate);
- method public inline void forEach(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,kotlin.Unit> block);
- method @IntRange(from=0L) public inline int getCapacity();
- method public androidx.collection.MutableLongSet getSet();
- method @IntRange(from=0L) public inline int getSize();
- method public inline boolean isEmpty();
- method public inline boolean isNotEmpty();
- method public inline operator void minusAssign(androidx.collection.LongSet elements);
- method public inline operator void minusAssign(androidx.collection.MutableLongSet elements);
- method public inline operator void minusAssign(long element);
- method public inline boolean none();
- method public inline operator void plusAssign(androidx.collection.LongSet elements);
- method public inline operator void plusAssign(androidx.collection.MutableLongSet elements);
- method public inline operator void plusAssign(long element);
- method public inline boolean remove(long element);
- method public inline boolean removeAll(androidx.collection.LongSet elements);
- method public inline boolean removeAll(androidx.collection.MutableLongSet elements);
- method @IntRange(from=0L) public inline int trim();
- property @IntRange(from=0L) public final inline int capacity;
- property public final androidx.collection.MutableLongSet set;
- property @IntRange(from=0L) public final inline int size;
- }
-
@androidx.compose.runtime.Immutable public final class OffsetEffect extends androidx.compose.ui.graphics.RenderEffect {
ctor public OffsetEffect(androidx.compose.ui.graphics.RenderEffect? renderEffect, long offset);
method @RequiresApi(android.os.Build.VERSION_CODES.S) protected android.graphics.RenderEffect createRenderEffect();
diff --git a/compose/ui/ui-graphics/api/restricted_current.txt b/compose/ui/ui-graphics/api/restricted_current.txt
index d654528..d5da1fb 100644
--- a/compose/ui/ui-graphics/api/restricted_current.txt
+++ b/compose/ui/ui-graphics/api/restricted_current.txt
@@ -421,60 +421,6 @@
method @ColorInt @androidx.compose.runtime.Stable public static int toArgb(long);
}
- @kotlin.jvm.JvmInline public final value class ColorList {
- ctor public ColorList(androidx.collection.LongList list);
- method public inline boolean any();
- method public inline boolean any(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,java.lang.Boolean> predicate);
- method public inline operator boolean contains(long element);
- method public inline boolean containsAll(androidx.collection.LongList elements);
- method public inline boolean containsAll(androidx.collection.MutableLongList elements);
- method public inline int count();
- method public inline int count(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,java.lang.Boolean> predicate);
- method public inline long elementAt(@IntRange(from=0L) int index);
- method public inline long elementAtOrElse(@IntRange(from=0L) int index, kotlin.jvm.functions.Function1<? super java.lang.Integer,androidx.compose.ui.graphics.Color> defaultValue);
- method public inline long first();
- method public inline long first(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,java.lang.Boolean> predicate);
- method public inline <R> R fold(R initial, kotlin.jvm.functions.Function2<? super R,? super androidx.compose.ui.graphics.Color,? extends R> operation);
- method public inline <R> R foldIndexed(R initial, kotlin.jvm.functions.Function3<? super java.lang.Integer,? super R,? super androidx.compose.ui.graphics.Color,? extends R> operation);
- method public inline <R> R foldRight(R initial, kotlin.jvm.functions.Function2<? super androidx.compose.ui.graphics.Color,? super R,? extends R> operation);
- method public inline <R> R foldRightIndexed(R initial, kotlin.jvm.functions.Function3<? super java.lang.Integer,? super androidx.compose.ui.graphics.Color,? super R,? extends R> operation);
- method public inline void forEach(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,kotlin.Unit> block);
- method public inline void forEachIndexed(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super androidx.compose.ui.graphics.Color,kotlin.Unit> block);
- method public inline void forEachReversed(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,kotlin.Unit> block);
- method public inline void forEachReversedIndexed(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super androidx.compose.ui.graphics.Color,kotlin.Unit> block);
- method public inline operator long get(@IntRange(from=0L) int index);
- method public inline kotlin.ranges.IntRange getIndices();
- method @IntRange(from=-1L) public inline int getLastIndex();
- method public androidx.collection.LongList getList();
- method @IntRange(from=0L) public inline int getSize();
- method public inline int indexOf(long element);
- method public inline int indexOfFirst(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,java.lang.Boolean> predicate);
- method public inline int indexOfLast(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,java.lang.Boolean> predicate);
- method public inline boolean isEmpty();
- method public inline boolean isNotEmpty();
- method public inline long last();
- method public inline long last(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,java.lang.Boolean> predicate);
- method public inline int lastIndexOf(long element);
- method public inline boolean none();
- method public inline boolean reversedAny(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,java.lang.Boolean> predicate);
- property public final inline kotlin.ranges.IntRange indices;
- property @IntRange(from=-1L) public final inline int lastIndex;
- property public final androidx.collection.LongList list;
- property @IntRange(from=0L) public final inline int size;
- }
-
- public final class ColorListKt {
- method public static inline androidx.collection.LongList colorListOf();
- method public static inline androidx.collection.LongList colorListOf(long element1);
- method public static inline androidx.collection.LongList colorListOf(long element1, long element2);
- method public static inline androidx.collection.LongList colorListOf(long element1, long element2, long element3);
- method public static inline androidx.collection.LongList emptyColorList();
- method public static inline androidx.collection.MutableLongList mutableColorListOf();
- method public static inline androidx.collection.MutableLongList mutableColorListOf(long element1);
- method public static inline androidx.collection.MutableLongList mutableColorListOf(long element1, long element2);
- method public static inline androidx.collection.MutableLongList mutableColorListOf(long element1, long element2, long element3);
- }
-
@kotlin.jvm.JvmInline public final value class ColorMatrix {
ctor public ColorMatrix(optional float[] values);
method public void convertRgbToYuv();
@@ -502,40 +448,6 @@
method public operator long invoke();
}
- @kotlin.jvm.JvmInline public final value class ColorSet {
- ctor public ColorSet(androidx.collection.LongSet set);
- method public inline boolean all(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,java.lang.Boolean> predicate);
- method public inline boolean any();
- method public inline boolean any(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,java.lang.Boolean> predicate);
- method public inline operator boolean contains(long element);
- method @IntRange(from=0L) public inline int count();
- method @IntRange(from=0L) public inline int count(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,java.lang.Boolean> predicate);
- method public inline long first();
- method public inline long first(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,java.lang.Boolean> predicate);
- method public inline void forEach(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,kotlin.Unit> block);
- method @IntRange(from=0L) public inline int getCapacity();
- method public androidx.collection.LongSet getSet();
- method @IntRange(from=0L) public inline int getSize();
- method public inline boolean isEmpty();
- method public inline boolean isNotEmpty();
- method public inline boolean none();
- property @IntRange(from=0L) public final inline int capacity;
- property public final androidx.collection.LongSet set;
- property @IntRange(from=0L) public final inline int size;
- }
-
- public final class ColorSetKt {
- method public static inline androidx.collection.LongSet colorSetOf();
- method public static inline androidx.collection.LongSet colorSetOf(long element1);
- method public static androidx.collection.LongSet colorSetOf(long element1, long element2);
- method public static androidx.collection.LongSet colorSetOf(long element1, long element2, long element3);
- method public static inline androidx.collection.LongSet emptyColorSet();
- method public static androidx.collection.MutableLongSet mutableColorSetOf();
- method public static androidx.collection.MutableLongSet mutableColorSetOf(long element1);
- method public static androidx.collection.MutableLongSet mutableColorSetOf(long element1, long element2);
- method public static androidx.collection.MutableLongSet mutableColorSetOf(long element1, long element2, long element3);
- }
-
public final class DegreesKt {
method @kotlin.PublishedApi internal static float degrees(float radians);
}
@@ -655,113 +567,6 @@
method public static boolean isIdentity(float[]);
}
- @kotlin.jvm.JvmInline public final value class MutableColorList {
- ctor public MutableColorList(androidx.collection.MutableLongList list);
- ctor public MutableColorList(optional int initialCapacity);
- method public inline void add(@IntRange(from=0L) int index, long element);
- method public inline boolean add(long element);
- method public inline boolean addAll(androidx.collection.LongList elements);
- method public inline boolean addAll(androidx.collection.MutableLongList elements);
- method public inline boolean addAll(@IntRange(from=0L) int index, androidx.collection.LongList elements);
- method public inline boolean addAll(@IntRange(from=0L) int index, androidx.collection.MutableLongList elements);
- method public inline boolean any();
- method public inline boolean any(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,java.lang.Boolean> predicate);
- method public inline androidx.collection.LongList asColorList();
- method public inline void clear();
- method public inline operator boolean contains(long element);
- method public inline boolean containsAll(androidx.collection.LongList elements);
- method public inline boolean containsAll(androidx.collection.MutableLongList elements);
- method public inline int count();
- method public inline int count(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,java.lang.Boolean> predicate);
- method public inline long elementAt(@IntRange(from=0L) int index);
- method public inline long elementAtOrElse(@IntRange(from=0L) int index, kotlin.jvm.functions.Function1<? super java.lang.Integer,androidx.compose.ui.graphics.Color> defaultValue);
- method public inline void ensureCapacity(int capacity);
- method public inline long first();
- method public inline long first(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,java.lang.Boolean> predicate);
- method public inline <R> R fold(R initial, kotlin.jvm.functions.Function2<? super R,? super androidx.compose.ui.graphics.Color,? extends R> operation);
- method public inline <R> R foldIndexed(R initial, kotlin.jvm.functions.Function3<? super java.lang.Integer,? super R,? super androidx.compose.ui.graphics.Color,? extends R> operation);
- method public inline <R> R foldRight(R initial, kotlin.jvm.functions.Function2<? super androidx.compose.ui.graphics.Color,? super R,? extends R> operation);
- method public inline <R> R foldRightIndexed(R initial, kotlin.jvm.functions.Function3<? super java.lang.Integer,? super androidx.compose.ui.graphics.Color,? super R,? extends R> operation);
- method public inline void forEach(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,kotlin.Unit> block);
- method public inline void forEachIndexed(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super androidx.compose.ui.graphics.Color,kotlin.Unit> block);
- method public inline void forEachReversed(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,kotlin.Unit> block);
- method public inline void forEachReversedIndexed(kotlin.jvm.functions.Function2<? super java.lang.Integer,? super androidx.compose.ui.graphics.Color,kotlin.Unit> block);
- method public inline operator long get(@IntRange(from=0L) int index);
- method public inline int getCapacity();
- method public inline kotlin.ranges.IntRange getIndices();
- method @IntRange(from=-1L) public inline int getLastIndex();
- method public androidx.collection.MutableLongList getList();
- method @IntRange(from=0L) public inline int getSize();
- method public inline int indexOf(long element);
- method public inline int indexOfFirst(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,java.lang.Boolean> predicate);
- method public inline int indexOfLast(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,java.lang.Boolean> predicate);
- method public inline boolean isEmpty();
- method public inline boolean isNotEmpty();
- method public inline long last();
- method public inline long last(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,java.lang.Boolean> predicate);
- method public inline int lastIndexOf(long element);
- method public inline operator void minusAssign(androidx.collection.LongList elements);
- method public inline operator void minusAssign(androidx.collection.MutableLongList elements);
- method public inline operator void minusAssign(long element);
- method public inline boolean none();
- method public inline operator void plusAssign(androidx.collection.LongList elements);
- method public inline operator void plusAssign(androidx.collection.MutableLongList elements);
- method public inline operator void plusAssign(long element);
- method public inline boolean remove(long element);
- method public inline boolean removeAll(androidx.collection.LongList elements);
- method public inline boolean removeAll(androidx.collection.MutableLongList elements);
- method public inline long removeAt(@IntRange(from=0L) int index);
- method public inline void removeRange(@IntRange(from=0L) int start, @IntRange(from=0L) int end);
- method public inline boolean retainAll(androidx.collection.LongList elements);
- method public inline boolean retainAll(androidx.collection.MutableLongList elements);
- method public inline boolean reversedAny(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,java.lang.Boolean> predicate);
- method public inline operator long set(@IntRange(from=0L) int index, long element);
- method public inline void trim(optional int minCapacity);
- property public final inline int capacity;
- property public final inline kotlin.ranges.IntRange indices;
- property @IntRange(from=-1L) public final inline int lastIndex;
- property public final androidx.collection.MutableLongList list;
- property @IntRange(from=0L) public final inline int size;
- }
-
- @kotlin.jvm.JvmInline public final value class MutableColorSet {
- ctor public MutableColorSet(androidx.collection.MutableLongSet set);
- ctor public MutableColorSet(optional int initialCapacity);
- method public inline boolean add(long element);
- method public inline boolean addAll(androidx.collection.LongSet elements);
- method public inline boolean addAll(androidx.collection.MutableLongSet elements);
- method public inline boolean all(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,java.lang.Boolean> predicate);
- method public inline boolean any();
- method public inline boolean any(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,java.lang.Boolean> predicate);
- method public inline androidx.collection.LongSet asColorSet();
- method public inline void clear();
- method public inline operator boolean contains(long element);
- method @IntRange(from=0L) public inline int count();
- method @IntRange(from=0L) public inline int count(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,java.lang.Boolean> predicate);
- method public inline long first();
- method public inline long first(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,java.lang.Boolean> predicate);
- method public inline void forEach(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.Color,kotlin.Unit> block);
- method @IntRange(from=0L) public inline int getCapacity();
- method public androidx.collection.MutableLongSet getSet();
- method @IntRange(from=0L) public inline int getSize();
- method public inline boolean isEmpty();
- method public inline boolean isNotEmpty();
- method public inline operator void minusAssign(androidx.collection.LongSet elements);
- method public inline operator void minusAssign(androidx.collection.MutableLongSet elements);
- method public inline operator void minusAssign(long element);
- method public inline boolean none();
- method public inline operator void plusAssign(androidx.collection.LongSet elements);
- method public inline operator void plusAssign(androidx.collection.MutableLongSet elements);
- method public inline operator void plusAssign(long element);
- method public inline boolean remove(long element);
- method public inline boolean removeAll(androidx.collection.LongSet elements);
- method public inline boolean removeAll(androidx.collection.MutableLongSet elements);
- method @IntRange(from=0L) public inline int trim();
- property @IntRange(from=0L) public final inline int capacity;
- property public final androidx.collection.MutableLongSet set;
- property @IntRange(from=0L) public final inline int size;
- }
-
@androidx.compose.runtime.Immutable public final class OffsetEffect extends androidx.compose.ui.graphics.RenderEffect {
ctor public OffsetEffect(androidx.compose.ui.graphics.RenderEffect? renderEffect, long offset);
method @RequiresApi(android.os.Build.VERSION_CODES.S) protected android.graphics.RenderEffect createRenderEffect();