@craft-native/android 0.0.212 → 0.0.213
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -353,6 +353,12 @@ object CraftNative {
|
|
|
353
353
|
nodeData: FloatArray,
|
|
354
354
|
treeMeta: FloatArray,
|
|
355
355
|
): FloatArray?
|
|
356
|
+
private external fun nativeLayoutTreeV4(
|
|
357
|
+
width: Float,
|
|
358
|
+
height: Float,
|
|
359
|
+
nodeData: FloatArray,
|
|
360
|
+
treeMeta: FloatArray,
|
|
361
|
+
): FloatArray?
|
|
356
362
|
private external fun nativeClipboardRead(activity: Activity): String?
|
|
357
363
|
private external fun nativeClipboardWrite(activity: Activity, text: String): Boolean
|
|
358
364
|
private external fun nativeOpenUrl(activity: Activity, url: String): Boolean
|
|
@@ -635,6 +641,17 @@ object CraftNative {
|
|
|
635
641
|
}
|
|
636
642
|
}
|
|
637
643
|
|
|
644
|
+
/** Resolve a reverse-aware tree with shared grid-auto-rows support. */
|
|
645
|
+
fun layoutTreeV4(width: Float, height: Float, nodeData: FloatArray, treeMeta: FloatArray): FloatArray? {
|
|
646
|
+
if (!isAvailable || nodeData.isEmpty() || treeMeta.isEmpty()) return null
|
|
647
|
+
return try {
|
|
648
|
+
nativeLayoutTreeV4(width, height, nodeData, treeMeta)
|
|
649
|
+
?.takeIf { it.size >= treeMeta.size / 2 * 4 && it.all { value -> value.isFinite() } }
|
|
650
|
+
} catch (e: UnsatisfiedLinkError) {
|
|
651
|
+
null
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
|
|
638
655
|
/**
|
|
639
656
|
* The clipboard's text, or null to use the Kotlin implementation.
|
|
640
657
|
*
|