Remove useVanillaJNI flag and usage of fbjni in yoga build
Summary: ## Changelog: [General] [Yoga] - Use vanilla jni instead of fbjni for all the jni communication Reviewed By: astreet Differential Revision: D17808005 fbshipit-source-id: 5e9a1ed73978f519c71c248774a28e5a294e7c7f
This commit is contained in:
committed by
Facebook Github Bot
parent
5960dd888d
commit
f99da09716
@@ -47,8 +47,6 @@ public abstract class YogaNodeJNIBase extends YogaNode implements Cloneable {
|
||||
|
||||
private boolean mHasNewLayout = true;
|
||||
|
||||
protected boolean useVanillaJNI = false;
|
||||
|
||||
private YogaNodeJNIBase(long nativePointer) {
|
||||
if (nativePointer == 0) {
|
||||
throw new IllegalStateException("Failed to allocate native memory");
|
||||
@@ -57,17 +55,11 @@ public abstract class YogaNodeJNIBase extends YogaNode implements Cloneable {
|
||||
}
|
||||
|
||||
YogaNodeJNIBase() {
|
||||
this(YogaNative.jni_YGNodeNew());
|
||||
}
|
||||
|
||||
YogaNodeJNIBase(boolean useVanillaJNI) {
|
||||
this(useVanillaJNI ? YogaNative.jni_YGNodeNewJNI() : YogaNative.jni_YGNodeNew());
|
||||
this.useVanillaJNI = useVanillaJNI;
|
||||
this(YogaNative.jni_YGNodeNewJNI());
|
||||
}
|
||||
|
||||
YogaNodeJNIBase(YogaConfig config) {
|
||||
this(config.useVanillaJNI() ? YogaNative.jni_YGNodeNewWithConfigJNI(((YogaConfigJNIBase)config).mNativePointer) : YogaNative.jni_YGNodeNewWithConfig(((YogaConfigJNIBase)config).mNativePointer));
|
||||
this.useVanillaJNI = config.useVanillaJNI();
|
||||
this(YogaNative.jni_YGNodeNewWithConfigJNI(((YogaConfigJNIBase)config).mNativePointer));
|
||||
}
|
||||
|
||||
public void reset() {
|
||||
@@ -78,10 +70,7 @@ public abstract class YogaNodeJNIBase extends YogaNode implements Cloneable {
|
||||
mHasNewLayout = true;
|
||||
mLayoutDirection = 0;
|
||||
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeResetJNI(mNativePointer);
|
||||
else
|
||||
YogaNative.jni_YGNodeReset(mNativePointer);
|
||||
YogaNative.jni_YGNodeResetJNI(mNativePointer);
|
||||
}
|
||||
|
||||
public int getChildCount() {
|
||||
@@ -106,28 +95,22 @@ public abstract class YogaNodeJNIBase extends YogaNode implements Cloneable {
|
||||
}
|
||||
mChildren.add(i, child);
|
||||
child.mOwner = this;
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeInsertChildJNI(mNativePointer, child.mNativePointer, i);
|
||||
else
|
||||
YogaNative.jni_YGNodeInsertChild(mNativePointer, child.mNativePointer, i);
|
||||
YogaNative.jni_YGNodeInsertChildJNI(mNativePointer, child.mNativePointer, i);
|
||||
}
|
||||
|
||||
public void setIsReferenceBaseline(boolean isReferenceBaseline) {
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeSetIsReferenceBaselineJNI(mNativePointer, isReferenceBaseline);
|
||||
else
|
||||
YogaNative.jni_YGNodeSetIsReferenceBaseline(mNativePointer, isReferenceBaseline);
|
||||
YogaNative.jni_YGNodeSetIsReferenceBaselineJNI(mNativePointer, isReferenceBaseline);
|
||||
}
|
||||
|
||||
public boolean isReferenceBaseline() {
|
||||
return useVanillaJNI ? YogaNative.jni_YGNodeIsReferenceBaselineJNI(mNativePointer) : YogaNative.jni_YGNodeIsReferenceBaseline(mNativePointer);
|
||||
return YogaNative.jni_YGNodeIsReferenceBaselineJNI(mNativePointer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public YogaNodeJNIBase cloneWithoutChildren() {
|
||||
try {
|
||||
YogaNodeJNIBase clonedYogaNode = (YogaNodeJNIBase) super.clone();
|
||||
long clonedNativePointer = useVanillaJNI ? YogaNative.jni_YGNodeCloneJNI(mNativePointer) : YogaNative.jni_YGNodeClone(mNativePointer);;
|
||||
long clonedNativePointer = YogaNative.jni_YGNodeCloneJNI(mNativePointer);
|
||||
clonedYogaNode.mOwner = null;
|
||||
clonedYogaNode.mNativePointer = clonedNativePointer;
|
||||
clonedYogaNode.clearChildren();
|
||||
@@ -140,10 +123,7 @@ public abstract class YogaNodeJNIBase extends YogaNode implements Cloneable {
|
||||
|
||||
private void clearChildren() {
|
||||
mChildren = null;
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeClearChildrenJNI(mNativePointer);
|
||||
else
|
||||
YogaNative.jni_YGNodeClearChildren(mNativePointer);
|
||||
YogaNative.jni_YGNodeClearChildrenJNI(mNativePointer);
|
||||
}
|
||||
|
||||
public YogaNodeJNIBase removeChildAt(int i) {
|
||||
@@ -153,10 +133,7 @@ public abstract class YogaNodeJNIBase extends YogaNode implements Cloneable {
|
||||
}
|
||||
final YogaNodeJNIBase child = mChildren.remove(i);
|
||||
child.mOwner = null;
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeRemoveChildJNI(mNativePointer, child.mNativePointer);
|
||||
else
|
||||
YogaNative.jni_YGNodeRemoveChild(mNativePointer, child.mNativePointer);
|
||||
YogaNative.jni_YGNodeRemoveChildJNI(mNativePointer, child.mNativePointer);
|
||||
return child;
|
||||
}
|
||||
|
||||
@@ -203,418 +180,285 @@ public abstract class YogaNodeJNIBase extends YogaNode implements Cloneable {
|
||||
nativePointers[i] = nodes[i].mNativePointer;
|
||||
}
|
||||
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeCalculateLayoutJNI(mNativePointer, width, height, nativePointers, nodes);
|
||||
else
|
||||
YogaNative.jni_YGNodeCalculateLayout(mNativePointer, width, height, nativePointers, nodes);
|
||||
YogaNative.jni_YGNodeCalculateLayoutJNI(mNativePointer, width, height, nativePointers, nodes);
|
||||
}
|
||||
|
||||
public void dirty() {
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeMarkDirtyJNI(mNativePointer);
|
||||
else
|
||||
YogaNative.jni_YGNodeMarkDirty(mNativePointer);
|
||||
YogaNative.jni_YGNodeMarkDirtyJNI(mNativePointer);
|
||||
}
|
||||
|
||||
public void dirtyAllDescendants() {
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeMarkDirtyAndPropogateToDescendantsJNI(mNativePointer);
|
||||
else
|
||||
YogaNative.jni_YGNodeMarkDirtyAndPropogateToDescendants(mNativePointer);
|
||||
YogaNative.jni_YGNodeMarkDirtyAndPropogateToDescendantsJNI(mNativePointer);
|
||||
}
|
||||
|
||||
public boolean isDirty() {
|
||||
return useVanillaJNI ? YogaNative.jni_YGNodeIsDirtyJNI(mNativePointer) : YogaNative.jni_YGNodeIsDirty(mNativePointer);
|
||||
return YogaNative.jni_YGNodeIsDirtyJNI(mNativePointer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void copyStyle(YogaNode srcNode) {
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeCopyStyleJNI(mNativePointer, ((YogaNodeJNIBase) srcNode).mNativePointer);
|
||||
else
|
||||
YogaNative.jni_YGNodeCopyStyle(mNativePointer, ((YogaNodeJNIBase) srcNode).mNativePointer);
|
||||
YogaNative.jni_YGNodeCopyStyleJNI(mNativePointer, ((YogaNodeJNIBase) srcNode).mNativePointer);
|
||||
}
|
||||
|
||||
public YogaDirection getStyleDirection() {
|
||||
return YogaDirection.fromInt(useVanillaJNI ? YogaNative.jni_YGNodeStyleGetDirectionJNI(mNativePointer) : YogaNative.jni_YGNodeStyleGetDirection(mNativePointer));
|
||||
return YogaDirection.fromInt(YogaNative.jni_YGNodeStyleGetDirectionJNI(mNativePointer));
|
||||
}
|
||||
|
||||
public void setDirection(YogaDirection direction) {
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeStyleSetDirectionJNI(mNativePointer, direction.intValue());
|
||||
else
|
||||
YogaNative.jni_YGNodeStyleSetDirection(mNativePointer, direction.intValue());
|
||||
YogaNative.jni_YGNodeStyleSetDirectionJNI(mNativePointer, direction.intValue());
|
||||
}
|
||||
|
||||
public YogaFlexDirection getFlexDirection() {
|
||||
return YogaFlexDirection.fromInt(useVanillaJNI ? YogaNative.jni_YGNodeStyleGetFlexDirectionJNI(mNativePointer) : YogaNative.jni_YGNodeStyleGetFlexDirection(mNativePointer));
|
||||
return YogaFlexDirection.fromInt(YogaNative.jni_YGNodeStyleGetFlexDirectionJNI(mNativePointer));
|
||||
}
|
||||
|
||||
public void setFlexDirection(YogaFlexDirection flexDirection) {
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeStyleSetFlexDirectionJNI(mNativePointer, flexDirection.intValue());
|
||||
else
|
||||
YogaNative.jni_YGNodeStyleSetFlexDirection(mNativePointer, flexDirection.intValue());
|
||||
YogaNative.jni_YGNodeStyleSetFlexDirectionJNI(mNativePointer, flexDirection.intValue());
|
||||
}
|
||||
|
||||
public YogaJustify getJustifyContent() {
|
||||
return YogaJustify.fromInt(useVanillaJNI ? YogaNative.jni_YGNodeStyleGetJustifyContentJNI(mNativePointer) : YogaNative.jni_YGNodeStyleGetJustifyContent(mNativePointer));
|
||||
return YogaJustify.fromInt(YogaNative.jni_YGNodeStyleGetJustifyContentJNI(mNativePointer));
|
||||
}
|
||||
|
||||
public void setJustifyContent(YogaJustify justifyContent) {
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeStyleSetJustifyContentJNI(mNativePointer, justifyContent.intValue());
|
||||
else
|
||||
YogaNative.jni_YGNodeStyleSetJustifyContent(mNativePointer, justifyContent.intValue());
|
||||
YogaNative.jni_YGNodeStyleSetJustifyContentJNI(mNativePointer, justifyContent.intValue());
|
||||
}
|
||||
|
||||
public YogaAlign getAlignItems() {
|
||||
return YogaAlign.fromInt(useVanillaJNI ? YogaNative.jni_YGNodeStyleGetAlignItemsJNI(mNativePointer) : YogaNative.jni_YGNodeStyleGetAlignItems(mNativePointer));
|
||||
return YogaAlign.fromInt(YogaNative.jni_YGNodeStyleGetAlignItemsJNI(mNativePointer));
|
||||
}
|
||||
|
||||
public void setAlignItems(YogaAlign alignItems) {
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeStyleSetAlignItemsJNI(mNativePointer, alignItems.intValue());
|
||||
else
|
||||
YogaNative.jni_YGNodeStyleSetAlignItems(mNativePointer, alignItems.intValue());
|
||||
YogaNative.jni_YGNodeStyleSetAlignItemsJNI(mNativePointer, alignItems.intValue());
|
||||
}
|
||||
|
||||
public YogaAlign getAlignSelf() {
|
||||
return YogaAlign.fromInt(useVanillaJNI ? YogaNative.jni_YGNodeStyleGetAlignSelfJNI(mNativePointer) : YogaNative.jni_YGNodeStyleGetAlignSelf(mNativePointer));
|
||||
return YogaAlign.fromInt(YogaNative.jni_YGNodeStyleGetAlignSelfJNI(mNativePointer));
|
||||
}
|
||||
|
||||
public void setAlignSelf(YogaAlign alignSelf) {
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeStyleSetAlignSelfJNI(mNativePointer, alignSelf.intValue());
|
||||
else
|
||||
YogaNative.jni_YGNodeStyleSetAlignSelf(mNativePointer, alignSelf.intValue());
|
||||
YogaNative.jni_YGNodeStyleSetAlignSelfJNI(mNativePointer, alignSelf.intValue());
|
||||
}
|
||||
|
||||
public YogaAlign getAlignContent() {
|
||||
return YogaAlign.fromInt(useVanillaJNI ? YogaNative.jni_YGNodeStyleGetAlignContentJNI(mNativePointer) : YogaNative.jni_YGNodeStyleGetAlignContent(mNativePointer));
|
||||
return YogaAlign.fromInt(YogaNative.jni_YGNodeStyleGetAlignContentJNI(mNativePointer));
|
||||
}
|
||||
|
||||
public void setAlignContent(YogaAlign alignContent) {
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeStyleSetAlignContentJNI(mNativePointer, alignContent.intValue());
|
||||
else
|
||||
YogaNative.jni_YGNodeStyleSetAlignContent(mNativePointer, alignContent.intValue());
|
||||
YogaNative.jni_YGNodeStyleSetAlignContentJNI(mNativePointer, alignContent.intValue());
|
||||
}
|
||||
|
||||
public YogaPositionType getPositionType() {
|
||||
return YogaPositionType.fromInt(useVanillaJNI ? YogaNative.jni_YGNodeStyleGetPositionTypeJNI(mNativePointer) : YogaNative.jni_YGNodeStyleGetPositionType(mNativePointer));
|
||||
return YogaPositionType.fromInt(YogaNative.jni_YGNodeStyleGetPositionTypeJNI(mNativePointer));
|
||||
}
|
||||
|
||||
public void setPositionType(YogaPositionType positionType) {
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeStyleSetPositionTypeJNI(mNativePointer, positionType.intValue());
|
||||
else
|
||||
YogaNative.jni_YGNodeStyleSetPositionType(mNativePointer, positionType.intValue());
|
||||
YogaNative.jni_YGNodeStyleSetPositionTypeJNI(mNativePointer, positionType.intValue());
|
||||
}
|
||||
|
||||
public YogaWrap getWrap() {
|
||||
return YogaWrap.fromInt(useVanillaJNI ? YogaNative.jni_YGNodeStyleGetFlexWrapJNI(mNativePointer) : YogaNative.jni_YGNodeStyleGetFlexWrap(mNativePointer));
|
||||
return YogaWrap.fromInt(YogaNative.jni_YGNodeStyleGetFlexWrapJNI(mNativePointer));
|
||||
}
|
||||
|
||||
public void setWrap(YogaWrap flexWrap) {
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeStyleSetFlexWrapJNI(mNativePointer, flexWrap.intValue());
|
||||
else
|
||||
YogaNative.jni_YGNodeStyleSetFlexWrap(mNativePointer, flexWrap.intValue());
|
||||
YogaNative.jni_YGNodeStyleSetFlexWrapJNI(mNativePointer, flexWrap.intValue());
|
||||
}
|
||||
|
||||
public YogaOverflow getOverflow() {
|
||||
return YogaOverflow.fromInt(useVanillaJNI ? YogaNative.jni_YGNodeStyleGetOverflowJNI(mNativePointer) : YogaNative.jni_YGNodeStyleGetOverflow(mNativePointer));
|
||||
return YogaOverflow.fromInt(YogaNative.jni_YGNodeStyleGetOverflowJNI(mNativePointer));
|
||||
}
|
||||
|
||||
public void setOverflow(YogaOverflow overflow) {
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeStyleSetOverflowJNI(mNativePointer, overflow.intValue());
|
||||
else
|
||||
YogaNative.jni_YGNodeStyleSetOverflow(mNativePointer, overflow.intValue());
|
||||
YogaNative.jni_YGNodeStyleSetOverflowJNI(mNativePointer, overflow.intValue());
|
||||
}
|
||||
|
||||
public YogaDisplay getDisplay() {
|
||||
return YogaDisplay.fromInt(useVanillaJNI ? YogaNative.jni_YGNodeStyleGetDisplayJNI(mNativePointer) : YogaNative.jni_YGNodeStyleGetDisplay(mNativePointer));
|
||||
return YogaDisplay.fromInt(YogaNative.jni_YGNodeStyleGetDisplayJNI(mNativePointer));
|
||||
}
|
||||
|
||||
public void setDisplay(YogaDisplay display) {
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeStyleSetDisplayJNI(mNativePointer, display.intValue());
|
||||
else
|
||||
YogaNative.jni_YGNodeStyleSetDisplay(mNativePointer, display.intValue());
|
||||
YogaNative.jni_YGNodeStyleSetDisplayJNI(mNativePointer, display.intValue());
|
||||
}
|
||||
|
||||
public float getFlex() {
|
||||
return useVanillaJNI ? YogaNative.jni_YGNodeStyleGetFlexJNI(mNativePointer) : YogaNative.jni_YGNodeStyleGetFlex(mNativePointer);
|
||||
return YogaNative.jni_YGNodeStyleGetFlexJNI(mNativePointer);
|
||||
}
|
||||
|
||||
public void setFlex(float flex) {
|
||||
if (useVanillaJNI) {
|
||||
YogaNative.jni_YGNodeStyleSetFlexJNI(mNativePointer, flex);
|
||||
} else {
|
||||
YogaNative.jni_YGNodeStyleSetFlex(mNativePointer, flex);
|
||||
}
|
||||
YogaNative.jni_YGNodeStyleSetFlexJNI(mNativePointer, flex);
|
||||
}
|
||||
|
||||
public float getFlexGrow() {
|
||||
return useVanillaJNI ? YogaNative.jni_YGNodeStyleGetFlexGrowJNI(mNativePointer) : YogaNative.jni_YGNodeStyleGetFlexGrow(mNativePointer);
|
||||
return YogaNative.jni_YGNodeStyleGetFlexGrowJNI(mNativePointer);
|
||||
}
|
||||
|
||||
public void setFlexGrow(float flexGrow) {
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeStyleSetFlexGrowJNI(mNativePointer, flexGrow);
|
||||
else
|
||||
YogaNative.jni_YGNodeStyleSetFlexGrow(mNativePointer, flexGrow);
|
||||
YogaNative.jni_YGNodeStyleSetFlexGrowJNI(mNativePointer, flexGrow);
|
||||
}
|
||||
|
||||
public float getFlexShrink() {
|
||||
return useVanillaJNI ? YogaNative.jni_YGNodeStyleGetFlexShrinkJNI(mNativePointer) : YogaNative.jni_YGNodeStyleGetFlexShrink(mNativePointer);
|
||||
return YogaNative.jni_YGNodeStyleGetFlexShrinkJNI(mNativePointer);
|
||||
}
|
||||
|
||||
public void setFlexShrink(float flexShrink) {
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeStyleSetFlexShrinkJNI(mNativePointer, flexShrink);
|
||||
else
|
||||
YogaNative.jni_YGNodeStyleSetFlexShrink(mNativePointer, flexShrink);
|
||||
YogaNative.jni_YGNodeStyleSetFlexShrinkJNI(mNativePointer, flexShrink);
|
||||
}
|
||||
|
||||
public YogaValue getFlexBasis() {
|
||||
return valueFromLong(useVanillaJNI ? YogaNative.jni_YGNodeStyleGetFlexBasisJNI(mNativePointer) : YogaNative.jni_YGNodeStyleGetFlexBasis(mNativePointer));
|
||||
return valueFromLong(YogaNative.jni_YGNodeStyleGetFlexBasisJNI(mNativePointer));
|
||||
}
|
||||
|
||||
public void setFlexBasis(float flexBasis) {
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeStyleSetFlexBasisJNI(mNativePointer, flexBasis);
|
||||
else
|
||||
YogaNative.jni_YGNodeStyleSetFlexBasis(mNativePointer, flexBasis);
|
||||
YogaNative.jni_YGNodeStyleSetFlexBasisJNI(mNativePointer, flexBasis);
|
||||
}
|
||||
|
||||
public void setFlexBasisPercent(float percent) {
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeStyleSetFlexBasisPercentJNI(mNativePointer, percent);
|
||||
else
|
||||
YogaNative.jni_YGNodeStyleSetFlexBasisPercent(mNativePointer, percent);
|
||||
YogaNative.jni_YGNodeStyleSetFlexBasisPercentJNI(mNativePointer, percent);
|
||||
}
|
||||
|
||||
public void setFlexBasisAuto() {
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeStyleSetFlexBasisAutoJNI(mNativePointer);
|
||||
else
|
||||
YogaNative.jni_YGNodeStyleSetFlexBasisAuto(mNativePointer);
|
||||
YogaNative.jni_YGNodeStyleSetFlexBasisAutoJNI(mNativePointer);
|
||||
}
|
||||
|
||||
public YogaValue getMargin(YogaEdge edge) {
|
||||
return valueFromLong(useVanillaJNI ? YogaNative.jni_YGNodeStyleGetMarginJNI(mNativePointer, edge.intValue()) : YogaNative.jni_YGNodeStyleGetMargin(mNativePointer, edge.intValue()));
|
||||
return valueFromLong(YogaNative.jni_YGNodeStyleGetMarginJNI(mNativePointer, edge.intValue()));
|
||||
}
|
||||
|
||||
public void setMargin(YogaEdge edge, float margin) {
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeStyleSetMarginJNI(mNativePointer, edge.intValue(), margin);
|
||||
else
|
||||
YogaNative.jni_YGNodeStyleSetMargin(mNativePointer, edge.intValue(), margin);
|
||||
YogaNative.jni_YGNodeStyleSetMarginJNI(mNativePointer, edge.intValue(), margin);
|
||||
}
|
||||
|
||||
public void setMarginPercent(YogaEdge edge, float percent) {
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeStyleSetMarginPercentJNI(mNativePointer, edge.intValue(), percent);
|
||||
else
|
||||
YogaNative.jni_YGNodeStyleSetMarginPercent(mNativePointer, edge.intValue(), percent);
|
||||
YogaNative.jni_YGNodeStyleSetMarginPercentJNI(mNativePointer, edge.intValue(), percent);
|
||||
}
|
||||
|
||||
public void setMarginAuto(YogaEdge edge) {
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeStyleSetMarginAutoJNI(mNativePointer, edge.intValue());
|
||||
else
|
||||
YogaNative.jni_YGNodeStyleSetMarginAuto(mNativePointer, edge.intValue());
|
||||
YogaNative.jni_YGNodeStyleSetMarginAutoJNI(mNativePointer, edge.intValue());
|
||||
}
|
||||
|
||||
public YogaValue getPadding(YogaEdge edge) {
|
||||
return valueFromLong(useVanillaJNI ? YogaNative.jni_YGNodeStyleGetPaddingJNI(mNativePointer, edge.intValue()) : YogaNative.jni_YGNodeStyleGetPadding(mNativePointer, edge.intValue()));
|
||||
return valueFromLong(YogaNative.jni_YGNodeStyleGetPaddingJNI(mNativePointer, edge.intValue()));
|
||||
}
|
||||
|
||||
public void setPadding(YogaEdge edge, float padding) {
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeStyleSetPaddingJNI(mNativePointer, edge.intValue(), padding);
|
||||
else
|
||||
YogaNative.jni_YGNodeStyleSetPadding(mNativePointer, edge.intValue(), padding);
|
||||
YogaNative.jni_YGNodeStyleSetPaddingJNI(mNativePointer, edge.intValue(), padding);
|
||||
}
|
||||
|
||||
public void setPaddingPercent(YogaEdge edge, float percent) {
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeStyleSetPaddingPercentJNI(mNativePointer, edge.intValue(), percent);
|
||||
else
|
||||
YogaNative.jni_YGNodeStyleSetPaddingPercent(mNativePointer, edge.intValue(), percent);
|
||||
YogaNative.jni_YGNodeStyleSetPaddingPercentJNI(mNativePointer, edge.intValue(), percent);
|
||||
}
|
||||
|
||||
public float getBorder(YogaEdge edge) {
|
||||
return useVanillaJNI ? YogaNative.jni_YGNodeStyleGetBorderJNI(mNativePointer, edge.intValue()) : YogaNative.jni_YGNodeStyleGetBorder(mNativePointer, edge.intValue());
|
||||
return YogaNative.jni_YGNodeStyleGetBorderJNI(mNativePointer, edge.intValue());
|
||||
}
|
||||
|
||||
public void setBorder(YogaEdge edge, float border) {
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeStyleSetBorderJNI(mNativePointer, edge.intValue(), border);
|
||||
else
|
||||
YogaNative.jni_YGNodeStyleSetBorder(mNativePointer, edge.intValue(), border);
|
||||
YogaNative.jni_YGNodeStyleSetBorderJNI(mNativePointer, edge.intValue(), border);
|
||||
}
|
||||
|
||||
public YogaValue getPosition(YogaEdge edge) {
|
||||
return valueFromLong(useVanillaJNI ? YogaNative.jni_YGNodeStyleGetPositionJNI(mNativePointer, edge.intValue()) : YogaNative.jni_YGNodeStyleGetPosition(mNativePointer, edge.intValue()));
|
||||
return valueFromLong(YogaNative.jni_YGNodeStyleGetPositionJNI(mNativePointer, edge.intValue()));
|
||||
}
|
||||
|
||||
public void setPosition(YogaEdge edge, float position) {
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeStyleSetPositionJNI(mNativePointer, edge.intValue(), position);
|
||||
else
|
||||
YogaNative.jni_YGNodeStyleSetPosition(mNativePointer, edge.intValue(), position);
|
||||
YogaNative.jni_YGNodeStyleSetPositionJNI(mNativePointer, edge.intValue(), position);
|
||||
}
|
||||
|
||||
public void setPositionPercent(YogaEdge edge, float percent) {
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeStyleSetPositionPercentJNI(mNativePointer, edge.intValue(), percent);
|
||||
else
|
||||
YogaNative.jni_YGNodeStyleSetPositionPercent(mNativePointer, edge.intValue(), percent);
|
||||
YogaNative.jni_YGNodeStyleSetPositionPercentJNI(mNativePointer, edge.intValue(), percent);
|
||||
}
|
||||
|
||||
public YogaValue getWidth() {
|
||||
return valueFromLong(useVanillaJNI ? YogaNative.jni_YGNodeStyleGetWidthJNI(mNativePointer) : YogaNative.jni_YGNodeStyleGetWidth(mNativePointer));
|
||||
return valueFromLong(YogaNative.jni_YGNodeStyleGetWidthJNI(mNativePointer));
|
||||
}
|
||||
|
||||
public void setWidth(float width) {
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeStyleSetWidthJNI(mNativePointer, width);
|
||||
else
|
||||
YogaNative.jni_YGNodeStyleSetWidth(mNativePointer, width);
|
||||
YogaNative.jni_YGNodeStyleSetWidthJNI(mNativePointer, width);
|
||||
}
|
||||
|
||||
public void setWidthPercent(float percent) {
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeStyleSetWidthPercentJNI(mNativePointer, percent);
|
||||
else
|
||||
YogaNative.jni_YGNodeStyleSetWidthPercent(mNativePointer, percent);
|
||||
YogaNative.jni_YGNodeStyleSetWidthPercentJNI(mNativePointer, percent);
|
||||
}
|
||||
|
||||
public void setWidthAuto() {
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeStyleSetWidthAutoJNI(mNativePointer);
|
||||
else
|
||||
YogaNative.jni_YGNodeStyleSetWidthAuto(mNativePointer);
|
||||
YogaNative.jni_YGNodeStyleSetWidthAutoJNI(mNativePointer);
|
||||
}
|
||||
|
||||
public YogaValue getHeight() {
|
||||
return valueFromLong(useVanillaJNI ? YogaNative.jni_YGNodeStyleGetHeightJNI(mNativePointer) : YogaNative.jni_YGNodeStyleGetHeight(mNativePointer));
|
||||
return valueFromLong(YogaNative.jni_YGNodeStyleGetHeightJNI(mNativePointer));
|
||||
}
|
||||
|
||||
public void setHeight(float height) {
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeStyleSetHeightJNI(mNativePointer, height);
|
||||
else
|
||||
YogaNative.jni_YGNodeStyleSetHeight(mNativePointer, height);
|
||||
YogaNative.jni_YGNodeStyleSetHeightJNI(mNativePointer, height);
|
||||
}
|
||||
|
||||
public void setHeightPercent(float percent) {
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeStyleSetHeightPercentJNI(mNativePointer, percent);
|
||||
else
|
||||
YogaNative.jni_YGNodeStyleSetHeightPercent(mNativePointer, percent);
|
||||
YogaNative.jni_YGNodeStyleSetHeightPercentJNI(mNativePointer, percent);
|
||||
}
|
||||
|
||||
public void setHeightAuto() {
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeStyleSetHeightAutoJNI(mNativePointer);
|
||||
else
|
||||
YogaNative.jni_YGNodeStyleSetHeightAuto(mNativePointer);
|
||||
YogaNative.jni_YGNodeStyleSetHeightAutoJNI(mNativePointer);
|
||||
}
|
||||
|
||||
public YogaValue getMinWidth() {
|
||||
return valueFromLong(useVanillaJNI ? YogaNative.jni_YGNodeStyleGetMinWidthJNI(mNativePointer) : YogaNative.jni_YGNodeStyleGetMinWidth(mNativePointer));
|
||||
return valueFromLong(YogaNative.jni_YGNodeStyleGetMinWidthJNI(mNativePointer));
|
||||
}
|
||||
|
||||
public void setMinWidth(float minWidth) {
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeStyleSetMinWidthJNI(mNativePointer, minWidth);
|
||||
else
|
||||
YogaNative.jni_YGNodeStyleSetMinWidth(mNativePointer, minWidth);
|
||||
YogaNative.jni_YGNodeStyleSetMinWidthJNI(mNativePointer, minWidth);
|
||||
}
|
||||
|
||||
public void setMinWidthPercent(float percent) {
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeStyleSetMinWidthPercentJNI(mNativePointer, percent);
|
||||
else
|
||||
YogaNative.jni_YGNodeStyleSetMinWidthPercent(mNativePointer, percent);
|
||||
YogaNative.jni_YGNodeStyleSetMinWidthPercentJNI(mNativePointer, percent);
|
||||
}
|
||||
|
||||
public YogaValue getMinHeight() {
|
||||
return valueFromLong(useVanillaJNI ? YogaNative.jni_YGNodeStyleGetMinHeightJNI(mNativePointer) : YogaNative.jni_YGNodeStyleGetMinHeight(mNativePointer));
|
||||
return valueFromLong(YogaNative.jni_YGNodeStyleGetMinHeightJNI(mNativePointer));
|
||||
}
|
||||
|
||||
public void setMinHeight(float minHeight) {
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeStyleSetMinHeightJNI(mNativePointer, minHeight);
|
||||
else
|
||||
YogaNative.jni_YGNodeStyleSetMinHeight(mNativePointer, minHeight);
|
||||
YogaNative.jni_YGNodeStyleSetMinHeightJNI(mNativePointer, minHeight);
|
||||
}
|
||||
|
||||
public void setMinHeightPercent(float percent) {
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeStyleSetMinHeightPercentJNI(mNativePointer, percent);
|
||||
else
|
||||
YogaNative.jni_YGNodeStyleSetMinHeightPercent(mNativePointer, percent);
|
||||
YogaNative.jni_YGNodeStyleSetMinHeightPercentJNI(mNativePointer, percent);
|
||||
}
|
||||
|
||||
public YogaValue getMaxWidth() {
|
||||
return valueFromLong(useVanillaJNI ? YogaNative.jni_YGNodeStyleGetMaxWidthJNI(mNativePointer) : YogaNative.jni_YGNodeStyleGetMaxWidth(mNativePointer));
|
||||
return valueFromLong(YogaNative.jni_YGNodeStyleGetMaxWidthJNI(mNativePointer));
|
||||
}
|
||||
|
||||
public void setMaxWidth(float maxWidth) {
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeStyleSetMaxWidthJNI(mNativePointer, maxWidth);
|
||||
else
|
||||
YogaNative.jni_YGNodeStyleSetMaxWidth(mNativePointer, maxWidth);
|
||||
YogaNative.jni_YGNodeStyleSetMaxWidthJNI(mNativePointer, maxWidth);
|
||||
}
|
||||
|
||||
public void setMaxWidthPercent(float percent) {
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeStyleSetMaxWidthPercentJNI(mNativePointer, percent);
|
||||
else
|
||||
YogaNative.jni_YGNodeStyleSetMaxWidthPercent(mNativePointer, percent);
|
||||
YogaNative.jni_YGNodeStyleSetMaxWidthPercentJNI(mNativePointer, percent);
|
||||
}
|
||||
|
||||
public YogaValue getMaxHeight() {
|
||||
return valueFromLong(useVanillaJNI ? YogaNative.jni_YGNodeStyleGetMaxHeightJNI(mNativePointer) : YogaNative.jni_YGNodeStyleGetMaxHeight(mNativePointer));
|
||||
return valueFromLong(YogaNative.jni_YGNodeStyleGetMaxHeightJNI(mNativePointer));
|
||||
}
|
||||
|
||||
public void setMaxHeight(float maxheight) {
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeStyleSetMaxHeightJNI(mNativePointer, maxheight);
|
||||
else
|
||||
YogaNative.jni_YGNodeStyleSetMaxHeight(mNativePointer, maxheight);
|
||||
YogaNative.jni_YGNodeStyleSetMaxHeightJNI(mNativePointer, maxheight);
|
||||
}
|
||||
|
||||
public void setMaxHeightPercent(float percent) {
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeStyleSetMaxHeightPercentJNI(mNativePointer, percent);
|
||||
else
|
||||
YogaNative.jni_YGNodeStyleSetMaxHeightPercent(mNativePointer, percent);
|
||||
YogaNative.jni_YGNodeStyleSetMaxHeightPercentJNI(mNativePointer, percent);
|
||||
}
|
||||
|
||||
public float getAspectRatio() {
|
||||
return useVanillaJNI ? YogaNative.jni_YGNodeStyleGetAspectRatioJNI(mNativePointer) : YogaNative.jni_YGNodeStyleGetAspectRatio(mNativePointer);
|
||||
return YogaNative.jni_YGNodeStyleGetAspectRatioJNI(mNativePointer);
|
||||
}
|
||||
|
||||
public void setAspectRatio(float aspectRatio) {
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeStyleSetAspectRatioJNI(mNativePointer, aspectRatio);
|
||||
else
|
||||
YogaNative.jni_YGNodeStyleSetAspectRatio(mNativePointer, aspectRatio);
|
||||
YogaNative.jni_YGNodeStyleSetAspectRatioJNI(mNativePointer, aspectRatio);
|
||||
}
|
||||
|
||||
public void setMeasureFunction(YogaMeasureFunction measureFunction) {
|
||||
mMeasureFunction = measureFunction;
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeSetHasMeasureFuncJNI(mNativePointer, measureFunction != null);
|
||||
else
|
||||
YogaNative.jni_YGNodeSetHasMeasureFunc(mNativePointer, measureFunction != null);
|
||||
YogaNative.jni_YGNodeSetHasMeasureFuncJNI(mNativePointer, measureFunction != null);
|
||||
}
|
||||
|
||||
// Implementation Note: Why this method needs to stay final
|
||||
@@ -638,10 +482,7 @@ public abstract class YogaNodeJNIBase extends YogaNode implements Cloneable {
|
||||
|
||||
public void setBaselineFunction(YogaBaselineFunction baselineFunction) {
|
||||
mBaselineFunction = baselineFunction;
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodeSetHasBaselineFuncJNI(mNativePointer, baselineFunction != null);
|
||||
else
|
||||
YogaNative.jni_YGNodeSetHasBaselineFunc(mNativePointer, baselineFunction != null);
|
||||
YogaNative.jni_YGNodeSetHasBaselineFuncJNI(mNativePointer, baselineFunction != null);
|
||||
}
|
||||
|
||||
@DoNotStrip
|
||||
@@ -672,10 +513,7 @@ public abstract class YogaNodeJNIBase extends YogaNode implements Cloneable {
|
||||
* layout of the tree rooted at this node.
|
||||
*/
|
||||
public void print() {
|
||||
if (useVanillaJNI)
|
||||
YogaNative.jni_YGNodePrintJNI(mNativePointer);
|
||||
else
|
||||
YogaNative.jni_YGNodePrint(mNativePointer);
|
||||
YogaNative.jni_YGNodePrintJNI(mNativePointer);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user