From c582f7caa6e87bff1ae3dfafadfe38033b2dcaff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateo=20Guzm=C3=A1n?= Date: Wed, 13 Aug 2025 08:56:03 -0700 Subject: [PATCH] Migrate `YogaNative` to Kotlin (#1839) Summary: Migrate com.facebook.yoga.YogaNative to Kotlin. Pull Request resolved: https://github.com/facebook/yoga/pull/1839 Test Plan: RN ```sh yarn android yarn test-android ``` Yoga ```sh ./gradlew :yoga:assembleDebug ``` Reviewed By: rshest Differential Revision: D79897725 Pulled By: cortinico fbshipit-source-id: 6fc98565368d831b8698464fe26ad47f8fff6a74 --- java/com/facebook/yoga/YogaNative.java | 141 ----------- java/com/facebook/yoga/YogaNative.kt | 331 +++++++++++++++++++++++++ 2 files changed, 331 insertions(+), 141 deletions(-) delete mode 100644 java/com/facebook/yoga/YogaNative.java create mode 100644 java/com/facebook/yoga/YogaNative.kt diff --git a/java/com/facebook/yoga/YogaNative.java b/java/com/facebook/yoga/YogaNative.java deleted file mode 100644 index 8d23257a..00000000 --- a/java/com/facebook/yoga/YogaNative.java +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -package com.facebook.yoga; - -import com.facebook.yoga.annotations.DoNotStrip; -import com.facebook.soloader.SoLoader; - -@DoNotStrip -public class YogaNative { - static { - SoLoader.loadLibrary("yoga"); - } - - // JNI methods that use Vanilla JNI - // YGConfig related - static native long jni_YGConfigNewJNI(); - static native void jni_YGConfigFreeJNI(long nativePointer); - static native void jni_YGConfigSetExperimentalFeatureEnabledJNI(long nativePointer, int feature, boolean enabled); - static native void jni_YGConfigSetUseWebDefaultsJNI(long nativePointer, boolean useWebDefaults); - static native void jni_YGConfigSetPointScaleFactorJNI(long nativePointer, float pixelsInPoint); - static native void jni_YGConfigSetErrataJNI(long nativePointer, int errata); - static native int jni_YGConfigGetErrataJNI(long nativePointer); - static native void jni_YGConfigSetLoggerJNI(long nativePointer, YogaLogger logger); - - // YGNode related - static native long jni_YGNodeNewJNI(); - static native long jni_YGNodeNewWithConfigJNI(long configPointer); - static native void jni_YGNodeFinalizeJNI(long nativePointer); - static native void jni_YGNodeResetJNI(long nativePointer); - static native void jni_YGNodeInsertChildJNI(long nativePointer, long childPointer, int index); - static native void jni_YGNodeSwapChildJNI(long nativePointer, long childPointer, int index); - static native void jni_YGNodeSetIsReferenceBaselineJNI(long nativePointer, boolean isReferenceBaseline); - static native boolean jni_YGNodeIsReferenceBaselineJNI(long nativePointer); - static native void jni_YGNodeRemoveAllChildrenJNI(long nativePointer); - static native void jni_YGNodeRemoveChildJNI(long nativePointer, long childPointer); - static native void jni_YGNodeCalculateLayoutJNI(long nativePointer, float width, float height, long[] nativePointers, YogaNodeJNIBase[] nodes); - static native void jni_YGNodeMarkDirtyJNI(long nativePointer); - static native boolean jni_YGNodeIsDirtyJNI(long nativePointer); - static native void jni_YGNodeCopyStyleJNI(long dstNativePointer, long srcNativePointer); - static native int jni_YGNodeStyleGetDirectionJNI(long nativePointer); - static native void jni_YGNodeStyleSetDirectionJNI(long nativePointer, int direction); - static native int jni_YGNodeStyleGetFlexDirectionJNI(long nativePointer); - static native void jni_YGNodeStyleSetFlexDirectionJNI(long nativePointer, int flexDirection); - static native int jni_YGNodeStyleGetJustifyContentJNI(long nativePointer); - static native void jni_YGNodeStyleSetJustifyContentJNI(long nativePointer, int justifyContent); - static native int jni_YGNodeStyleGetAlignItemsJNI(long nativePointer); - static native void jni_YGNodeStyleSetAlignItemsJNI(long nativePointer, int alignItems); - static native int jni_YGNodeStyleGetAlignSelfJNI(long nativePointer); - static native void jni_YGNodeStyleSetAlignSelfJNI(long nativePointer, int alignSelf); - static native int jni_YGNodeStyleGetAlignContentJNI(long nativePointer); - static native void jni_YGNodeStyleSetAlignContentJNI(long nativePointer, int alignContent); - static native int jni_YGNodeStyleGetPositionTypeJNI(long nativePointer); - static native void jni_YGNodeStyleSetPositionTypeJNI(long nativePointer, int positionType); - static native int jni_YGNodeStyleGetBoxSizingJNI(long nativePointer); - static native void jni_YGNodeStyleSetBoxSizingJNI(long nativePointer, int boxSizing); - static native int jni_YGNodeStyleGetFlexWrapJNI(long nativePointer); - static native void jni_YGNodeStyleSetFlexWrapJNI(long nativePointer, int wrapType); - static native int jni_YGNodeStyleGetOverflowJNI(long nativePointer); - static native void jni_YGNodeStyleSetOverflowJNI(long nativePointer, int overflow); - static native int jni_YGNodeStyleGetDisplayJNI(long nativePointer); - static native void jni_YGNodeStyleSetDisplayJNI(long nativePointer, int display); - static native float jni_YGNodeStyleGetFlexJNI(long nativePointer); - static native void jni_YGNodeStyleSetFlexJNI(long nativePointer, float flex); - static native float jni_YGNodeStyleGetFlexGrowJNI(long nativePointer); - static native void jni_YGNodeStyleSetFlexGrowJNI(long nativePointer, float flexGrow); - static native float jni_YGNodeStyleGetFlexShrinkJNI(long nativePointer); - static native void jni_YGNodeStyleSetFlexShrinkJNI(long nativePointer, float flexShrink); - static native long jni_YGNodeStyleGetFlexBasisJNI(long nativePointer); - static native void jni_YGNodeStyleSetFlexBasisJNI(long nativePointer, float flexBasis); - static native void jni_YGNodeStyleSetFlexBasisPercentJNI(long nativePointer, float percent); - static native void jni_YGNodeStyleSetFlexBasisAutoJNI(long nativePointer); - static native void jni_YGNodeStyleSetFlexBasisMaxContentJNI(long nativePointer); - static native void jni_YGNodeStyleSetFlexBasisFitContentJNI(long nativePointer); - static native void jni_YGNodeStyleSetFlexBasisStretchJNI(long nativePointer); - static native long jni_YGNodeStyleGetMarginJNI(long nativePointer, int edge); - static native void jni_YGNodeStyleSetMarginJNI(long nativePointer, int edge, float margin); - static native void jni_YGNodeStyleSetMarginPercentJNI(long nativePointer, int edge, float percent); - static native void jni_YGNodeStyleSetMarginAutoJNI(long nativePointer, int edge); - static native long jni_YGNodeStyleGetPaddingJNI(long nativePointer, int edge); - static native void jni_YGNodeStyleSetPaddingJNI(long nativePointer, int edge, float padding); - static native void jni_YGNodeStyleSetPaddingPercentJNI(long nativePointer, int edge, float percent); - static native float jni_YGNodeStyleGetBorderJNI(long nativePointer, int edge); - static native void jni_YGNodeStyleSetBorderJNI(long nativePointer, int edge, float border); - static native long jni_YGNodeStyleGetPositionJNI(long nativePointer, int edge); - static native void jni_YGNodeStyleSetPositionJNI(long nativePointer, int edge, float position); - static native void jni_YGNodeStyleSetPositionPercentJNI(long nativePointer, int edge, float percent); - static native void jni_YGNodeStyleSetPositionAutoJNI(long nativePointer, int edge); - static native long jni_YGNodeStyleGetWidthJNI(long nativePointer); - static native void jni_YGNodeStyleSetWidthJNI(long nativePointer, float width); - static native void jni_YGNodeStyleSetWidthPercentJNI(long nativePointer, float percent); - static native void jni_YGNodeStyleSetWidthAutoJNI(long nativePointer); - static native void jni_YGNodeStyleSetWidthMaxContentJNI(long nativePointer); - static native void jni_YGNodeStyleSetWidthFitContentJNI(long nativePointer); - static native void jni_YGNodeStyleSetWidthStretchJNI(long nativePointer); - static native long jni_YGNodeStyleGetHeightJNI(long nativePointer); - static native void jni_YGNodeStyleSetHeightJNI(long nativePointer, float height); - static native void jni_YGNodeStyleSetHeightPercentJNI(long nativePointer, float percent); - static native void jni_YGNodeStyleSetHeightAutoJNI(long nativePointer); - static native void jni_YGNodeStyleSetHeightMaxContentJNI(long nativePointer); - static native void jni_YGNodeStyleSetHeightFitContentJNI(long nativePointer); - static native void jni_YGNodeStyleSetHeightStretchJNI(long nativePointer); - static native long jni_YGNodeStyleGetMinWidthJNI(long nativePointer); - static native void jni_YGNodeStyleSetMinWidthJNI(long nativePointer, float minWidth); - static native void jni_YGNodeStyleSetMinWidthPercentJNI(long nativePointer, float percent); - static native void jni_YGNodeStyleSetMinWidthMaxContentJNI(long nativePointer); - static native void jni_YGNodeStyleSetMinWidthFitContentJNI(long nativePointer); - static native void jni_YGNodeStyleSetMinWidthStretchJNI(long nativePointer); - static native long jni_YGNodeStyleGetMinHeightJNI(long nativePointer); - static native void jni_YGNodeStyleSetMinHeightJNI(long nativePointer, float minHeight); - static native void jni_YGNodeStyleSetMinHeightPercentJNI(long nativePointer, float percent); - static native void jni_YGNodeStyleSetMinHeightMaxContentJNI(long nativePointer); - static native void jni_YGNodeStyleSetMinHeightFitContentJNI(long nativePointer); - static native void jni_YGNodeStyleSetMinHeightStretchJNI(long nativePointer); - static native long jni_YGNodeStyleGetMaxWidthJNI(long nativePointer); - static native void jni_YGNodeStyleSetMaxWidthJNI(long nativePointer, float maxWidth); - static native void jni_YGNodeStyleSetMaxWidthPercentJNI(long nativePointer, float percent); - static native void jni_YGNodeStyleSetMaxWidthMaxContentJNI(long nativePointer); - static native void jni_YGNodeStyleSetMaxWidthFitContentJNI(long nativePointer); - static native void jni_YGNodeStyleSetMaxWidthStretchJNI(long nativePointer); - static native long jni_YGNodeStyleGetMaxHeightJNI(long nativePointer); - static native void jni_YGNodeStyleSetMaxHeightJNI(long nativePointer, float maxheight); - static native void jni_YGNodeStyleSetMaxHeightPercentJNI(long nativePointer, float percent); - static native void jni_YGNodeStyleSetMaxHeightMaxContentJNI(long nativePointer); - static native void jni_YGNodeStyleSetMaxHeightFitContentJNI(long nativePointer); - static native void jni_YGNodeStyleSetMaxHeightStretchJNI(long nativePointer); - static native float jni_YGNodeStyleGetAspectRatioJNI(long nativePointer); - static native void jni_YGNodeStyleSetAspectRatioJNI(long nativePointer, float aspectRatio); - static native long jni_YGNodeStyleGetGapJNI(long nativePointer, int gutter); - static native void jni_YGNodeStyleSetGapJNI(long nativePointer, int gutter, float gapLength); - static native void jni_YGNodeStyleSetGapPercentJNI(long nativePointer, int gutter, float gapLength); - static native void jni_YGNodeSetHasMeasureFuncJNI(long nativePointer, boolean hasMeasureFunc); - static native void jni_YGNodeSetHasBaselineFuncJNI(long nativePointer, boolean hasMeasureFunc); - static native void jni_YGNodeSetStyleInputsJNI(long nativePointer, float[] styleInputsArray, int size); - static native long jni_YGNodeCloneJNI(long nativePointer); - static native void jni_YGNodeSetAlwaysFormsContainingBlockJNI(long nativePointer, boolean alwaysFormContainingBlock); -} diff --git a/java/com/facebook/yoga/YogaNative.kt b/java/com/facebook/yoga/YogaNative.kt new file mode 100644 index 00000000..518326d4 --- /dev/null +++ b/java/com/facebook/yoga/YogaNative.kt @@ -0,0 +1,331 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package com.facebook.yoga + +import com.facebook.soloader.SoLoader +import com.facebook.yoga.annotations.DoNotStrip + +@DoNotStrip +public object YogaNative { + init { + SoLoader.loadLibrary("yoga") + } + + // JNI methods that use Vanilla JNI + // YGConfig related + @JvmStatic public external fun jni_YGConfigNewJNI(): Long + + @JvmStatic public external fun jni_YGConfigFreeJNI(nativePointer: Long) + + @JvmStatic + public external fun jni_YGConfigSetExperimentalFeatureEnabledJNI( + nativePointer: Long, + feature: Int, + enabled: Boolean + ) + + @JvmStatic + public external fun jni_YGConfigSetUseWebDefaultsJNI(nativePointer: Long, useWebDefaults: Boolean) + + @JvmStatic + public external fun jni_YGConfigSetPointScaleFactorJNI(nativePointer: Long, pixelsInPoint: Float) + + @JvmStatic public external fun jni_YGConfigSetErrataJNI(nativePointer: Long, errata: Int) + + @JvmStatic public external fun jni_YGConfigGetErrataJNI(nativePointer: Long): Int + + @JvmStatic public external fun jni_YGConfigSetLoggerJNI(nativePointer: Long, logger: YogaLogger) + + // YGNode related + @JvmStatic public external fun jni_YGNodeNewJNI(): Long + + @JvmStatic public external fun jni_YGNodeNewWithConfigJNI(configPointer: Long): Long + + @JvmStatic public external fun jni_YGNodeFinalizeJNI(nativePointer: Long) + + @JvmStatic public external fun jni_YGNodeResetJNI(nativePointer: Long) + + @JvmStatic + public external fun jni_YGNodeInsertChildJNI(nativePointer: Long, childPointer: Long, index: Int) + + @JvmStatic + public external fun jni_YGNodeSwapChildJNI(nativePointer: Long, childPointer: Long, index: Int) + + @JvmStatic + public external fun jni_YGNodeSetIsReferenceBaselineJNI( + nativePointer: Long, + isReferenceBaseline: Boolean + ) + + @JvmStatic public external fun jni_YGNodeIsReferenceBaselineJNI(nativePointer: Long): Boolean + + @JvmStatic public external fun jni_YGNodeRemoveAllChildrenJNI(nativePointer: Long) + + @JvmStatic public external fun jni_YGNodeRemoveChildJNI(nativePointer: Long, childPointer: Long) + + @JvmStatic + public external fun jni_YGNodeCalculateLayoutJNI( + nativePointer: Long, + width: Float, + height: Float, + nativePointers: LongArray, + nodes: Array + ) + + @JvmStatic public external fun jni_YGNodeMarkDirtyJNI(nativePointer: Long) + + @JvmStatic public external fun jni_YGNodeIsDirtyJNI(nativePointer: Long): Boolean + + @JvmStatic + public external fun jni_YGNodeCopyStyleJNI(dstNativePointer: Long, srcNativePointer: Long) + + @JvmStatic public external fun jni_YGNodeStyleGetDirectionJNI(nativePointer: Long): Int + + @JvmStatic public external fun jni_YGNodeStyleSetDirectionJNI(nativePointer: Long, direction: Int) + + @JvmStatic public external fun jni_YGNodeStyleGetFlexDirectionJNI(nativePointer: Long): Int + + @JvmStatic + public external fun jni_YGNodeStyleSetFlexDirectionJNI(nativePointer: Long, flexDirection: Int) + + @JvmStatic public external fun jni_YGNodeStyleGetJustifyContentJNI(nativePointer: Long): Int + + @JvmStatic + public external fun jni_YGNodeStyleSetJustifyContentJNI(nativePointer: Long, justifyContent: Int) + + @JvmStatic public external fun jni_YGNodeStyleGetAlignItemsJNI(nativePointer: Long): Int + + @JvmStatic + public external fun jni_YGNodeStyleSetAlignItemsJNI(nativePointer: Long, alignItems: Int) + + @JvmStatic public external fun jni_YGNodeStyleGetAlignSelfJNI(nativePointer: Long): Int + + @JvmStatic public external fun jni_YGNodeStyleSetAlignSelfJNI(nativePointer: Long, alignSelf: Int) + + @JvmStatic public external fun jni_YGNodeStyleGetAlignContentJNI(nativePointer: Long): Int + + @JvmStatic + public external fun jni_YGNodeStyleSetAlignContentJNI(nativePointer: Long, alignContent: Int) + + @JvmStatic public external fun jni_YGNodeStyleGetPositionTypeJNI(nativePointer: Long): Int + + @JvmStatic + public external fun jni_YGNodeStyleSetPositionTypeJNI(nativePointer: Long, positionType: Int) + + @JvmStatic public external fun jni_YGNodeStyleGetBoxSizingJNI(nativePointer: Long): Int + + @JvmStatic public external fun jni_YGNodeStyleSetBoxSizingJNI(nativePointer: Long, boxSizing: Int) + + @JvmStatic public external fun jni_YGNodeStyleGetFlexWrapJNI(nativePointer: Long): Int + + @JvmStatic public external fun jni_YGNodeStyleSetFlexWrapJNI(nativePointer: Long, wrapType: Int) + + @JvmStatic public external fun jni_YGNodeStyleGetOverflowJNI(nativePointer: Long): Int + + @JvmStatic public external fun jni_YGNodeStyleSetOverflowJNI(nativePointer: Long, overflow: Int) + + @JvmStatic public external fun jni_YGNodeStyleGetDisplayJNI(nativePointer: Long): Int + + @JvmStatic public external fun jni_YGNodeStyleSetDisplayJNI(nativePointer: Long, display: Int) + + @JvmStatic public external fun jni_YGNodeStyleGetFlexJNI(nativePointer: Long): Float + + @JvmStatic public external fun jni_YGNodeStyleSetFlexJNI(nativePointer: Long, flex: Float) + + @JvmStatic public external fun jni_YGNodeStyleGetFlexGrowJNI(nativePointer: Long): Float + + @JvmStatic public external fun jni_YGNodeStyleSetFlexGrowJNI(nativePointer: Long, flexGrow: Float) + + @JvmStatic public external fun jni_YGNodeStyleGetFlexShrinkJNI(nativePointer: Long): Float + + @JvmStatic + public external fun jni_YGNodeStyleSetFlexShrinkJNI(nativePointer: Long, flexShrink: Float) + + @JvmStatic public external fun jni_YGNodeStyleGetFlexBasisJNI(nativePointer: Long): Long + + @JvmStatic + public external fun jni_YGNodeStyleSetFlexBasisJNI(nativePointer: Long, flexBasis: Float) + + @JvmStatic + public external fun jni_YGNodeStyleSetFlexBasisPercentJNI(nativePointer: Long, percent: Float) + + @JvmStatic public external fun jni_YGNodeStyleSetFlexBasisAutoJNI(nativePointer: Long) + + @JvmStatic public external fun jni_YGNodeStyleSetFlexBasisMaxContentJNI(nativePointer: Long) + + @JvmStatic public external fun jni_YGNodeStyleSetFlexBasisFitContentJNI(nativePointer: Long) + + @JvmStatic public external fun jni_YGNodeStyleSetFlexBasisStretchJNI(nativePointer: Long) + + @JvmStatic public external fun jni_YGNodeStyleGetMarginJNI(nativePointer: Long, edge: Int): Long + + @JvmStatic + public external fun jni_YGNodeStyleSetMarginJNI(nativePointer: Long, edge: Int, margin: Float) + + @JvmStatic + public external fun jni_YGNodeStyleSetMarginPercentJNI( + nativePointer: Long, + edge: Int, + percent: Float + ) + + @JvmStatic public external fun jni_YGNodeStyleSetMarginAutoJNI(nativePointer: Long, edge: Int) + + @JvmStatic public external fun jni_YGNodeStyleGetPaddingJNI(nativePointer: Long, edge: Int): Long + + @JvmStatic + public external fun jni_YGNodeStyleSetPaddingJNI(nativePointer: Long, edge: Int, padding: Float) + + @JvmStatic + public external fun jni_YGNodeStyleSetPaddingPercentJNI( + nativePointer: Long, + edge: Int, + percent: Float + ) + + @JvmStatic public external fun jni_YGNodeStyleGetBorderJNI(nativePointer: Long, edge: Int): Float + + @JvmStatic + public external fun jni_YGNodeStyleSetBorderJNI(nativePointer: Long, edge: Int, border: Float) + + @JvmStatic public external fun jni_YGNodeStyleGetPositionJNI(nativePointer: Long, edge: Int): Long + + @JvmStatic + public external fun jni_YGNodeStyleSetPositionJNI(nativePointer: Long, edge: Int, position: Float) + + @JvmStatic + public external fun jni_YGNodeStyleSetPositionPercentJNI( + nativePointer: Long, + edge: Int, + percent: Float + ) + + @JvmStatic public external fun jni_YGNodeStyleSetPositionAutoJNI(nativePointer: Long, edge: Int) + + @JvmStatic public external fun jni_YGNodeStyleGetWidthJNI(nativePointer: Long): Long + + @JvmStatic public external fun jni_YGNodeStyleSetWidthJNI(nativePointer: Long, width: Float) + + @JvmStatic + public external fun jni_YGNodeStyleSetWidthPercentJNI(nativePointer: Long, percent: Float) + + @JvmStatic public external fun jni_YGNodeStyleSetWidthAutoJNI(nativePointer: Long) + + @JvmStatic public external fun jni_YGNodeStyleSetWidthMaxContentJNI(nativePointer: Long) + + @JvmStatic public external fun jni_YGNodeStyleSetWidthFitContentJNI(nativePointer: Long) + + @JvmStatic public external fun jni_YGNodeStyleSetWidthStretchJNI(nativePointer: Long) + + @JvmStatic public external fun jni_YGNodeStyleGetHeightJNI(nativePointer: Long): Long + + @JvmStatic public external fun jni_YGNodeStyleSetHeightJNI(nativePointer: Long, height: Float) + + @JvmStatic + public external fun jni_YGNodeStyleSetHeightPercentJNI(nativePointer: Long, percent: Float) + + @JvmStatic public external fun jni_YGNodeStyleSetHeightAutoJNI(nativePointer: Long) + + @JvmStatic public external fun jni_YGNodeStyleSetHeightMaxContentJNI(nativePointer: Long) + + @JvmStatic public external fun jni_YGNodeStyleSetHeightFitContentJNI(nativePointer: Long) + + @JvmStatic public external fun jni_YGNodeStyleSetHeightStretchJNI(nativePointer: Long) + + @JvmStatic public external fun jni_YGNodeStyleGetMinWidthJNI(nativePointer: Long): Long + + @JvmStatic public external fun jni_YGNodeStyleSetMinWidthJNI(nativePointer: Long, minWidth: Float) + + @JvmStatic + public external fun jni_YGNodeStyleSetMinWidthPercentJNI(nativePointer: Long, percent: Float) + + @JvmStatic public external fun jni_YGNodeStyleSetMinWidthMaxContentJNI(nativePointer: Long) + + @JvmStatic public external fun jni_YGNodeStyleSetMinWidthFitContentJNI(nativePointer: Long) + + @JvmStatic public external fun jni_YGNodeStyleSetMinWidthStretchJNI(nativePointer: Long) + + @JvmStatic public external fun jni_YGNodeStyleGetMinHeightJNI(nativePointer: Long): Long + + @JvmStatic + public external fun jni_YGNodeStyleSetMinHeightJNI(nativePointer: Long, minHeight: Float) + + @JvmStatic + public external fun jni_YGNodeStyleSetMinHeightPercentJNI(nativePointer: Long, percent: Float) + + @JvmStatic public external fun jni_YGNodeStyleSetMinHeightMaxContentJNI(nativePointer: Long) + + @JvmStatic public external fun jni_YGNodeStyleSetMinHeightFitContentJNI(nativePointer: Long) + + @JvmStatic public external fun jni_YGNodeStyleSetMinHeightStretchJNI(nativePointer: Long) + + @JvmStatic public external fun jni_YGNodeStyleGetMaxWidthJNI(nativePointer: Long): Long + + @JvmStatic public external fun jni_YGNodeStyleSetMaxWidthJNI(nativePointer: Long, maxWidth: Float) + + @JvmStatic + public external fun jni_YGNodeStyleSetMaxWidthPercentJNI(nativePointer: Long, percent: Float) + + @JvmStatic public external fun jni_YGNodeStyleSetMaxWidthMaxContentJNI(nativePointer: Long) + + @JvmStatic public external fun jni_YGNodeStyleSetMaxWidthFitContentJNI(nativePointer: Long) + + @JvmStatic public external fun jni_YGNodeStyleSetMaxWidthStretchJNI(nativePointer: Long) + + @JvmStatic public external fun jni_YGNodeStyleGetMaxHeightJNI(nativePointer: Long): Long + + @JvmStatic + public external fun jni_YGNodeStyleSetMaxHeightJNI(nativePointer: Long, maxheight: Float) + + @JvmStatic + public external fun jni_YGNodeStyleSetMaxHeightPercentJNI(nativePointer: Long, percent: Float) + + @JvmStatic public external fun jni_YGNodeStyleSetMaxHeightMaxContentJNI(nativePointer: Long) + + @JvmStatic public external fun jni_YGNodeStyleSetMaxHeightFitContentJNI(nativePointer: Long) + + @JvmStatic public external fun jni_YGNodeStyleSetMaxHeightStretchJNI(nativePointer: Long) + + @JvmStatic public external fun jni_YGNodeStyleGetAspectRatioJNI(nativePointer: Long): Float + + @JvmStatic + public external fun jni_YGNodeStyleSetAspectRatioJNI(nativePointer: Long, aspectRatio: Float) + + @JvmStatic public external fun jni_YGNodeStyleGetGapJNI(nativePointer: Long, gutter: Int): Long + + @JvmStatic + public external fun jni_YGNodeStyleSetGapJNI(nativePointer: Long, gutter: Int, gapLength: Float) + + @JvmStatic + public external fun jni_YGNodeStyleSetGapPercentJNI( + nativePointer: Long, + gutter: Int, + gapLength: Float + ) + + @JvmStatic + public external fun jni_YGNodeSetHasMeasureFuncJNI(nativePointer: Long, hasMeasureFunc: Boolean) + + @JvmStatic + public external fun jni_YGNodeSetHasBaselineFuncJNI(nativePointer: Long, hasMeasureFunc: Boolean) + + @JvmStatic + public external fun jni_YGNodeSetStyleInputsJNI( + nativePointer: Long, + styleInputsArray: FloatArray, + size: Int + ) + + @JvmStatic public external fun jni_YGNodeCloneJNI(nativePointer: Long): Long + + @JvmStatic + public external fun jni_YGNodeSetAlwaysFormsContainingBlockJNI( + nativePointer: Long, + alwaysFormContainingBlock: Boolean + ) +}