mirror of
https://github.com/status-im/react-native.git
synced 2025-01-14 11:34:23 +00:00
Remove references to CSSLayoutDEPRECATED
Reviewed By: marco-cova Differential Revision: D4859822 fbshipit-source-id: 2588c1b3334f28332ae43e6c0bdec65934ca84c4
This commit is contained in:
parent
219328d000
commit
2030c78355
@ -11,7 +11,7 @@ package com.facebook.react.flat;
|
|||||||
|
|
||||||
import com.facebook.yoga.YogaMeasureMode;
|
import com.facebook.yoga.YogaMeasureMode;
|
||||||
import com.facebook.yoga.YogaMeasureFunction;
|
import com.facebook.yoga.YogaMeasureFunction;
|
||||||
import com.facebook.yoga.YogaNodeAPI;
|
import com.facebook.yoga.YogaNode;
|
||||||
import com.facebook.react.uimanager.BaseViewManager;
|
import com.facebook.react.uimanager.BaseViewManager;
|
||||||
import com.facebook.react.uimanager.ThemedReactContext;
|
import com.facebook.react.uimanager.ThemedReactContext;
|
||||||
import com.facebook.react.views.art.ARTSurfaceView;
|
import com.facebook.react.views.art.ARTSurfaceView;
|
||||||
@ -24,7 +24,7 @@ public class FlatARTSurfaceViewManager extends
|
|||||||
private static final YogaMeasureFunction MEASURE_FUNCTION = new YogaMeasureFunction() {
|
private static final YogaMeasureFunction MEASURE_FUNCTION = new YogaMeasureFunction() {
|
||||||
@Override
|
@Override
|
||||||
public long measure(
|
public long measure(
|
||||||
YogaNodeAPI node,
|
YogaNode node,
|
||||||
float width,
|
float width,
|
||||||
YogaMeasureMode widthMode,
|
YogaMeasureMode widthMode,
|
||||||
float height,
|
float height,
|
||||||
|
@ -19,7 +19,7 @@ import android.view.Gravity;
|
|||||||
import com.facebook.yoga.YogaDirection;
|
import com.facebook.yoga.YogaDirection;
|
||||||
import com.facebook.yoga.YogaMeasureMode;
|
import com.facebook.yoga.YogaMeasureMode;
|
||||||
import com.facebook.yoga.YogaMeasureFunction;
|
import com.facebook.yoga.YogaMeasureFunction;
|
||||||
import com.facebook.yoga.YogaNodeAPI;
|
import com.facebook.yoga.YogaNode;
|
||||||
import com.facebook.yoga.YogaMeasureOutput;
|
import com.facebook.yoga.YogaMeasureOutput;
|
||||||
import com.facebook.fbui.textlayoutbuilder.TextLayoutBuilder;
|
import com.facebook.fbui.textlayoutbuilder.TextLayoutBuilder;
|
||||||
import com.facebook.fbui.textlayoutbuilder.glyphwarmer.GlyphWarmerImpl;
|
import com.facebook.fbui.textlayoutbuilder.glyphwarmer.GlyphWarmerImpl;
|
||||||
@ -75,7 +75,7 @@ import com.facebook.react.uimanager.annotations.ReactProp;
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long measure(
|
public long measure(
|
||||||
YogaNodeAPI node,
|
YogaNode node,
|
||||||
float width,
|
float width,
|
||||||
YogaMeasureMode widthMode,
|
YogaMeasureMode widthMode,
|
||||||
float height,
|
float height,
|
||||||
|
@ -20,7 +20,7 @@ import android.widget.EditText;
|
|||||||
|
|
||||||
import com.facebook.yoga.YogaMeasureMode;
|
import com.facebook.yoga.YogaMeasureMode;
|
||||||
import com.facebook.yoga.YogaMeasureFunction;
|
import com.facebook.yoga.YogaMeasureFunction;
|
||||||
import com.facebook.yoga.YogaNodeAPI;
|
import com.facebook.yoga.YogaNode;
|
||||||
import com.facebook.yoga.YogaMeasureOutput;
|
import com.facebook.yoga.YogaMeasureOutput;
|
||||||
import com.facebook.infer.annotation.Assertions;
|
import com.facebook.infer.annotation.Assertions;
|
||||||
import com.facebook.react.uimanager.PixelUtil;
|
import com.facebook.react.uimanager.PixelUtil;
|
||||||
@ -78,7 +78,7 @@ public class RCTTextInput extends RCTVirtualText implements AndroidView, YogaMea
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long measure(
|
public long measure(
|
||||||
YogaNodeAPI node,
|
YogaNode node,
|
||||||
float width,
|
float width,
|
||||||
YogaMeasureMode widthMode,
|
YogaMeasureMode widthMode,
|
||||||
float height,
|
float height,
|
||||||
|
@ -11,7 +11,7 @@ package com.facebook.react.views.art;
|
|||||||
|
|
||||||
import com.facebook.yoga.YogaMeasureMode;
|
import com.facebook.yoga.YogaMeasureMode;
|
||||||
import com.facebook.yoga.YogaMeasureFunction;
|
import com.facebook.yoga.YogaMeasureFunction;
|
||||||
import com.facebook.yoga.YogaNodeAPI;
|
import com.facebook.yoga.YogaNode;
|
||||||
import com.facebook.react.module.annotations.ReactModule;
|
import com.facebook.react.module.annotations.ReactModule;
|
||||||
import com.facebook.react.uimanager.BaseViewManager;
|
import com.facebook.react.uimanager.BaseViewManager;
|
||||||
import com.facebook.react.uimanager.ThemedReactContext;
|
import com.facebook.react.uimanager.ThemedReactContext;
|
||||||
@ -29,7 +29,7 @@ public class ARTSurfaceViewManager extends
|
|||||||
private static final YogaMeasureFunction MEASURE_FUNCTION = new YogaMeasureFunction() {
|
private static final YogaMeasureFunction MEASURE_FUNCTION = new YogaMeasureFunction() {
|
||||||
@Override
|
@Override
|
||||||
public long measure(
|
public long measure(
|
||||||
YogaNodeAPI node,
|
YogaNode node,
|
||||||
float width,
|
float width,
|
||||||
YogaMeasureMode widthMode,
|
YogaMeasureMode widthMode,
|
||||||
float height,
|
float height,
|
||||||
|
@ -21,7 +21,7 @@ import android.widget.ProgressBar;
|
|||||||
|
|
||||||
import com.facebook.yoga.YogaMeasureMode;
|
import com.facebook.yoga.YogaMeasureMode;
|
||||||
import com.facebook.yoga.YogaMeasureFunction;
|
import com.facebook.yoga.YogaMeasureFunction;
|
||||||
import com.facebook.yoga.YogaNodeAPI;
|
import com.facebook.yoga.YogaNode;
|
||||||
import com.facebook.yoga.YogaMeasureOutput;
|
import com.facebook.yoga.YogaMeasureOutput;
|
||||||
import com.facebook.react.uimanager.LayoutShadowNode;
|
import com.facebook.react.uimanager.LayoutShadowNode;
|
||||||
import com.facebook.react.uimanager.annotations.ReactProp;
|
import com.facebook.react.uimanager.annotations.ReactProp;
|
||||||
@ -54,7 +54,7 @@ public class ProgressBarShadowNode extends LayoutShadowNode implements YogaMeasu
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long measure(
|
public long measure(
|
||||||
YogaNodeAPI node,
|
YogaNode node,
|
||||||
float width,
|
float width,
|
||||||
YogaMeasureMode widthMode,
|
YogaMeasureMode widthMode,
|
||||||
float height,
|
float height,
|
||||||
|
@ -30,7 +30,7 @@ import com.facebook.react.uimanager.annotations.ReactProp;
|
|||||||
import com.facebook.yoga.YogaMeasureFunction;
|
import com.facebook.yoga.YogaMeasureFunction;
|
||||||
import com.facebook.yoga.YogaMeasureMode;
|
import com.facebook.yoga.YogaMeasureMode;
|
||||||
import com.facebook.yoga.YogaMeasureOutput;
|
import com.facebook.yoga.YogaMeasureOutput;
|
||||||
import com.facebook.yoga.YogaNodeAPI;
|
import com.facebook.yoga.YogaNode;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@ -58,7 +58,7 @@ public class ReactSliderManager extends SimpleViewManager<ReactSlider> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long measure(
|
public long measure(
|
||||||
YogaNodeAPI node,
|
YogaNode node,
|
||||||
float width,
|
float width,
|
||||||
YogaMeasureMode widthMode,
|
YogaMeasureMode widthMode,
|
||||||
float height,
|
float height,
|
||||||
|
@ -17,7 +17,7 @@ import android.widget.CompoundButton;
|
|||||||
|
|
||||||
import com.facebook.yoga.YogaMeasureMode;
|
import com.facebook.yoga.YogaMeasureMode;
|
||||||
import com.facebook.yoga.YogaMeasureFunction;
|
import com.facebook.yoga.YogaMeasureFunction;
|
||||||
import com.facebook.yoga.YogaNodeAPI;
|
import com.facebook.yoga.YogaNode;
|
||||||
import com.facebook.yoga.YogaMeasureOutput;
|
import com.facebook.yoga.YogaMeasureOutput;
|
||||||
import com.facebook.react.bridge.ReactContext;
|
import com.facebook.react.bridge.ReactContext;
|
||||||
import com.facebook.react.uimanager.LayoutShadowNode;
|
import com.facebook.react.uimanager.LayoutShadowNode;
|
||||||
@ -47,7 +47,7 @@ public class ReactSwitchManager extends SimpleViewManager<ReactSwitch> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long measure(
|
public long measure(
|
||||||
YogaNodeAPI node,
|
YogaNode node,
|
||||||
float width,
|
float width,
|
||||||
YogaMeasureMode widthMode,
|
YogaMeasureMode widthMode,
|
||||||
float height,
|
float height,
|
||||||
|
@ -35,7 +35,7 @@ import com.facebook.yoga.YogaDirection;
|
|||||||
import com.facebook.yoga.YogaConstants;
|
import com.facebook.yoga.YogaConstants;
|
||||||
import com.facebook.yoga.YogaMeasureMode;
|
import com.facebook.yoga.YogaMeasureMode;
|
||||||
import com.facebook.yoga.YogaMeasureFunction;
|
import com.facebook.yoga.YogaMeasureFunction;
|
||||||
import com.facebook.yoga.YogaNodeAPI;
|
import com.facebook.yoga.YogaNode;
|
||||||
import com.facebook.yoga.YogaMeasureOutput;
|
import com.facebook.yoga.YogaMeasureOutput;
|
||||||
import com.facebook.infer.annotation.Assertions;
|
import com.facebook.infer.annotation.Assertions;
|
||||||
import com.facebook.react.bridge.JSApplicationIllegalArgumentException;
|
import com.facebook.react.bridge.JSApplicationIllegalArgumentException;
|
||||||
@ -225,7 +225,7 @@ public class ReactTextShadowNode extends LayoutShadowNode {
|
|||||||
new YogaMeasureFunction() {
|
new YogaMeasureFunction() {
|
||||||
@Override
|
@Override
|
||||||
public long measure(
|
public long measure(
|
||||||
YogaNodeAPI node,
|
YogaNode node,
|
||||||
float width,
|
float width,
|
||||||
YogaMeasureMode widthMode,
|
YogaMeasureMode widthMode,
|
||||||
float height,
|
float height,
|
||||||
|
@ -22,7 +22,7 @@ import android.widget.EditText;
|
|||||||
import com.facebook.yoga.YogaDirection;
|
import com.facebook.yoga.YogaDirection;
|
||||||
import com.facebook.yoga.YogaMeasureMode;
|
import com.facebook.yoga.YogaMeasureMode;
|
||||||
import com.facebook.yoga.YogaMeasureFunction;
|
import com.facebook.yoga.YogaMeasureFunction;
|
||||||
import com.facebook.yoga.YogaNodeAPI;
|
import com.facebook.yoga.YogaNode;
|
||||||
import com.facebook.yoga.YogaMeasureOutput;
|
import com.facebook.yoga.YogaMeasureOutput;
|
||||||
import com.facebook.infer.annotation.Assertions;
|
import com.facebook.infer.annotation.Assertions;
|
||||||
import com.facebook.react.bridge.JSApplicationIllegalArgumentException;
|
import com.facebook.react.bridge.JSApplicationIllegalArgumentException;
|
||||||
@ -73,7 +73,7 @@ public class ReactTextInputShadowNode extends ReactTextShadowNode implements
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long measure(
|
public long measure(
|
||||||
YogaNodeAPI node,
|
YogaNode node,
|
||||||
float width,
|
float width,
|
||||||
YogaMeasureMode widthMode,
|
YogaMeasureMode widthMode,
|
||||||
float height,
|
float height,
|
||||||
|
@ -18,5 +18,5 @@ public interface YogaBaselineFunction {
|
|||||||
* default to the computed height of the node.
|
* default to the computed height of the node.
|
||||||
*/
|
*/
|
||||||
@DoNotStrip
|
@DoNotStrip
|
||||||
float baseline(YogaNodeAPI node, float width, float height);
|
float baseline(YogaNode node, float width, float height);
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ public interface YogaMeasureFunction {
|
|||||||
*/
|
*/
|
||||||
@DoNotStrip
|
@DoNotStrip
|
||||||
long measure(
|
long measure(
|
||||||
YogaNodeAPI node,
|
YogaNode node,
|
||||||
float width,
|
float width,
|
||||||
YogaMeasureMode widthMode,
|
YogaMeasureMode widthMode,
|
||||||
float height,
|
float height,
|
||||||
|
@ -18,7 +18,7 @@ import com.facebook.proguard.annotations.DoNotStrip;
|
|||||||
import com.facebook.soloader.SoLoader;
|
import com.facebook.soloader.SoLoader;
|
||||||
|
|
||||||
@DoNotStrip
|
@DoNotStrip
|
||||||
public class YogaNode implements YogaNodeAPI<YogaNode> {
|
public class YogaNode {
|
||||||
|
|
||||||
static {
|
static {
|
||||||
SoLoader.loadLibrary("yoga");
|
SoLoader.loadLibrary("yoga");
|
||||||
@ -106,7 +106,6 @@ public class YogaNode implements YogaNodeAPI<YogaNode> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeFree(long nativePointer);
|
private native void jni_YGNodeFree(long nativePointer);
|
||||||
@Override
|
|
||||||
protected void finalize() throws Throwable {
|
protected void finalize() throws Throwable {
|
||||||
try {
|
try {
|
||||||
jni_YGNodeFree(mNativePointer);
|
jni_YGNodeFree(mNativePointer);
|
||||||
@ -116,7 +115,6 @@ public class YogaNode implements YogaNodeAPI<YogaNode> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeReset(long nativePointer);
|
private native void jni_YGNodeReset(long nativePointer);
|
||||||
@Override
|
|
||||||
public void reset() {
|
public void reset() {
|
||||||
mEdgeSetFlag = 0;
|
mEdgeSetFlag = 0;
|
||||||
mHasSetPosition = false;
|
mHasSetPosition = false;
|
||||||
@ -146,18 +144,15 @@ public class YogaNode implements YogaNodeAPI<YogaNode> {
|
|||||||
jni_YGNodeReset(mNativePointer);
|
jni_YGNodeReset(mNativePointer);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getChildCount() {
|
public int getChildCount() {
|
||||||
return mChildren == null ? 0 : mChildren.size();
|
return mChildren == null ? 0 : mChildren.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public YogaNode getChildAt(int i) {
|
public YogaNode getChildAt(int i) {
|
||||||
return mChildren.get(i);
|
return mChildren.get(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeInsertChild(long nativePointer, long childPointer, int index);
|
private native void jni_YGNodeInsertChild(long nativePointer, long childPointer, int index);
|
||||||
@Override
|
|
||||||
public void addChildAt(YogaNode child, int i) {
|
public void addChildAt(YogaNode child, int i) {
|
||||||
if (child.mParent != null) {
|
if (child.mParent != null) {
|
||||||
throw new IllegalStateException("Child already has a parent, it must be removed first.");
|
throw new IllegalStateException("Child already has a parent, it must be removed first.");
|
||||||
@ -172,7 +167,6 @@ public class YogaNode implements YogaNodeAPI<YogaNode> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeRemoveChild(long nativePointer, long childPointer);
|
private native void jni_YGNodeRemoveChild(long nativePointer, long childPointer);
|
||||||
@Override
|
|
||||||
public YogaNode removeChildAt(int i) {
|
public YogaNode removeChildAt(int i) {
|
||||||
|
|
||||||
final YogaNode child = mChildren.remove(i);
|
final YogaNode child = mChildren.remove(i);
|
||||||
@ -181,221 +175,184 @@ public class YogaNode implements YogaNodeAPI<YogaNode> {
|
|||||||
return child;
|
return child;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public @Nullable
|
public @Nullable
|
||||||
YogaNode getParent() {
|
YogaNode getParent() {
|
||||||
return mParent;
|
return mParent;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public int indexOf(YogaNode child) {
|
public int indexOf(YogaNode child) {
|
||||||
return mChildren == null ? -1 : mChildren.indexOf(child);
|
return mChildren == null ? -1 : mChildren.indexOf(child);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeCalculateLayout(long nativePointer, float width, float height);
|
private native void jni_YGNodeCalculateLayout(long nativePointer, float width, float height);
|
||||||
@Override
|
|
||||||
public void calculateLayout(float width, float height) {
|
public void calculateLayout(float width, float height) {
|
||||||
jni_YGNodeCalculateLayout(mNativePointer, width, height);
|
jni_YGNodeCalculateLayout(mNativePointer, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean hasNewLayout() {
|
public boolean hasNewLayout() {
|
||||||
return mHasNewLayout;
|
return mHasNewLayout;
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeMarkDirty(long nativePointer);
|
private native void jni_YGNodeMarkDirty(long nativePointer);
|
||||||
@Override
|
|
||||||
public void dirty() {
|
public void dirty() {
|
||||||
jni_YGNodeMarkDirty(mNativePointer);
|
jni_YGNodeMarkDirty(mNativePointer);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native boolean jni_YGNodeIsDirty(long nativePointer);
|
private native boolean jni_YGNodeIsDirty(long nativePointer);
|
||||||
@Override
|
|
||||||
public boolean isDirty() {
|
public boolean isDirty() {
|
||||||
return jni_YGNodeIsDirty(mNativePointer);
|
return jni_YGNodeIsDirty(mNativePointer);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeCopyStyle(long dstNativePointer, long srcNativePointer);
|
private native void jni_YGNodeCopyStyle(long dstNativePointer, long srcNativePointer);
|
||||||
@Override
|
|
||||||
public void copyStyle(YogaNode srcNode) {
|
public void copyStyle(YogaNode srcNode) {
|
||||||
jni_YGNodeCopyStyle(mNativePointer, srcNode.mNativePointer);
|
jni_YGNodeCopyStyle(mNativePointer, srcNode.mNativePointer);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void markLayoutSeen() {
|
public void markLayoutSeen() {
|
||||||
mHasNewLayout = false;
|
mHasNewLayout = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private native int jni_YGNodeStyleGetDirection(long nativePointer);
|
private native int jni_YGNodeStyleGetDirection(long nativePointer);
|
||||||
@Override
|
|
||||||
public YogaDirection getStyleDirection() {
|
public YogaDirection getStyleDirection() {
|
||||||
return YogaDirection.fromInt(jni_YGNodeStyleGetDirection(mNativePointer));
|
return YogaDirection.fromInt(jni_YGNodeStyleGetDirection(mNativePointer));
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeStyleSetDirection(long nativePointer, int direction);
|
private native void jni_YGNodeStyleSetDirection(long nativePointer, int direction);
|
||||||
@Override
|
|
||||||
public void setDirection(YogaDirection direction) {
|
public void setDirection(YogaDirection direction) {
|
||||||
jni_YGNodeStyleSetDirection(mNativePointer, direction.intValue());
|
jni_YGNodeStyleSetDirection(mNativePointer, direction.intValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
private native int jni_YGNodeStyleGetFlexDirection(long nativePointer);
|
private native int jni_YGNodeStyleGetFlexDirection(long nativePointer);
|
||||||
@Override
|
|
||||||
public YogaFlexDirection getFlexDirection() {
|
public YogaFlexDirection getFlexDirection() {
|
||||||
return YogaFlexDirection.fromInt(jni_YGNodeStyleGetFlexDirection(mNativePointer));
|
return YogaFlexDirection.fromInt(jni_YGNodeStyleGetFlexDirection(mNativePointer));
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeStyleSetFlexDirection(long nativePointer, int flexDirection);
|
private native void jni_YGNodeStyleSetFlexDirection(long nativePointer, int flexDirection);
|
||||||
@Override
|
|
||||||
public void setFlexDirection(YogaFlexDirection flexDirection) {
|
public void setFlexDirection(YogaFlexDirection flexDirection) {
|
||||||
jni_YGNodeStyleSetFlexDirection(mNativePointer, flexDirection.intValue());
|
jni_YGNodeStyleSetFlexDirection(mNativePointer, flexDirection.intValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
private native int jni_YGNodeStyleGetJustifyContent(long nativePointer);
|
private native int jni_YGNodeStyleGetJustifyContent(long nativePointer);
|
||||||
@Override
|
|
||||||
public YogaJustify getJustifyContent() {
|
public YogaJustify getJustifyContent() {
|
||||||
return YogaJustify.fromInt(jni_YGNodeStyleGetJustifyContent(mNativePointer));
|
return YogaJustify.fromInt(jni_YGNodeStyleGetJustifyContent(mNativePointer));
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeStyleSetJustifyContent(long nativePointer, int justifyContent);
|
private native void jni_YGNodeStyleSetJustifyContent(long nativePointer, int justifyContent);
|
||||||
@Override
|
|
||||||
public void setJustifyContent(YogaJustify justifyContent) {
|
public void setJustifyContent(YogaJustify justifyContent) {
|
||||||
jni_YGNodeStyleSetJustifyContent(mNativePointer, justifyContent.intValue());
|
jni_YGNodeStyleSetJustifyContent(mNativePointer, justifyContent.intValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
private native int jni_YGNodeStyleGetAlignItems(long nativePointer);
|
private native int jni_YGNodeStyleGetAlignItems(long nativePointer);
|
||||||
@Override
|
|
||||||
public YogaAlign getAlignItems() {
|
public YogaAlign getAlignItems() {
|
||||||
return YogaAlign.fromInt(jni_YGNodeStyleGetAlignItems(mNativePointer));
|
return YogaAlign.fromInt(jni_YGNodeStyleGetAlignItems(mNativePointer));
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeStyleSetAlignItems(long nativePointer, int alignItems);
|
private native void jni_YGNodeStyleSetAlignItems(long nativePointer, int alignItems);
|
||||||
@Override
|
|
||||||
public void setAlignItems(YogaAlign alignItems) {
|
public void setAlignItems(YogaAlign alignItems) {
|
||||||
jni_YGNodeStyleSetAlignItems(mNativePointer, alignItems.intValue());
|
jni_YGNodeStyleSetAlignItems(mNativePointer, alignItems.intValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
private native int jni_YGNodeStyleGetAlignSelf(long nativePointer);
|
private native int jni_YGNodeStyleGetAlignSelf(long nativePointer);
|
||||||
@Override
|
|
||||||
public YogaAlign getAlignSelf() {
|
public YogaAlign getAlignSelf() {
|
||||||
return YogaAlign.fromInt(jni_YGNodeStyleGetAlignSelf(mNativePointer));
|
return YogaAlign.fromInt(jni_YGNodeStyleGetAlignSelf(mNativePointer));
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeStyleSetAlignSelf(long nativePointer, int alignSelf);
|
private native void jni_YGNodeStyleSetAlignSelf(long nativePointer, int alignSelf);
|
||||||
@Override
|
|
||||||
public void setAlignSelf(YogaAlign alignSelf) {
|
public void setAlignSelf(YogaAlign alignSelf) {
|
||||||
jni_YGNodeStyleSetAlignSelf(mNativePointer, alignSelf.intValue());
|
jni_YGNodeStyleSetAlignSelf(mNativePointer, alignSelf.intValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
private native int jni_YGNodeStyleGetAlignContent(long nativePointer);
|
private native int jni_YGNodeStyleGetAlignContent(long nativePointer);
|
||||||
@Override
|
|
||||||
public YogaAlign getAlignContent() {
|
public YogaAlign getAlignContent() {
|
||||||
return YogaAlign.fromInt(jni_YGNodeStyleGetAlignContent(mNativePointer));
|
return YogaAlign.fromInt(jni_YGNodeStyleGetAlignContent(mNativePointer));
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeStyleSetAlignContent(long nativePointer, int alignContent);
|
private native void jni_YGNodeStyleSetAlignContent(long nativePointer, int alignContent);
|
||||||
@Override
|
|
||||||
public void setAlignContent(YogaAlign alignContent) {
|
public void setAlignContent(YogaAlign alignContent) {
|
||||||
jni_YGNodeStyleSetAlignContent(mNativePointer, alignContent.intValue());
|
jni_YGNodeStyleSetAlignContent(mNativePointer, alignContent.intValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
private native int jni_YGNodeStyleGetPositionType(long nativePointer);
|
private native int jni_YGNodeStyleGetPositionType(long nativePointer);
|
||||||
@Override
|
|
||||||
public YogaPositionType getPositionType() {
|
public YogaPositionType getPositionType() {
|
||||||
return YogaPositionType.fromInt(jni_YGNodeStyleGetPositionType(mNativePointer));
|
return YogaPositionType.fromInt(jni_YGNodeStyleGetPositionType(mNativePointer));
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeStyleSetPositionType(long nativePointer, int positionType);
|
private native void jni_YGNodeStyleSetPositionType(long nativePointer, int positionType);
|
||||||
@Override
|
|
||||||
public void setPositionType(YogaPositionType positionType) {
|
public void setPositionType(YogaPositionType positionType) {
|
||||||
jni_YGNodeStyleSetPositionType(mNativePointer, positionType.intValue());
|
jni_YGNodeStyleSetPositionType(mNativePointer, positionType.intValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeStyleSetFlexWrap(long nativePointer, int wrapType);
|
private native void jni_YGNodeStyleSetFlexWrap(long nativePointer, int wrapType);
|
||||||
@Override
|
|
||||||
public void setWrap(YogaWrap flexWrap) {
|
public void setWrap(YogaWrap flexWrap) {
|
||||||
jni_YGNodeStyleSetFlexWrap(mNativePointer, flexWrap.intValue());
|
jni_YGNodeStyleSetFlexWrap(mNativePointer, flexWrap.intValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
private native int jni_YGNodeStyleGetOverflow(long nativePointer);
|
private native int jni_YGNodeStyleGetOverflow(long nativePointer);
|
||||||
@Override
|
|
||||||
public YogaOverflow getOverflow() {
|
public YogaOverflow getOverflow() {
|
||||||
return YogaOverflow.fromInt(jni_YGNodeStyleGetOverflow(mNativePointer));
|
return YogaOverflow.fromInt(jni_YGNodeStyleGetOverflow(mNativePointer));
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeStyleSetOverflow(long nativePointer, int overflow);
|
private native void jni_YGNodeStyleSetOverflow(long nativePointer, int overflow);
|
||||||
@Override
|
|
||||||
public void setOverflow(YogaOverflow overflow) {
|
public void setOverflow(YogaOverflow overflow) {
|
||||||
jni_YGNodeStyleSetOverflow(mNativePointer, overflow.intValue());
|
jni_YGNodeStyleSetOverflow(mNativePointer, overflow.intValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
private native int jni_YGNodeStyleGetDisplay(long nativePointer);
|
private native int jni_YGNodeStyleGetDisplay(long nativePointer);
|
||||||
@Override
|
|
||||||
public YogaDisplay getDisplay() {
|
public YogaDisplay getDisplay() {
|
||||||
return YogaDisplay.fromInt(jni_YGNodeStyleGetDisplay(mNativePointer));
|
return YogaDisplay.fromInt(jni_YGNodeStyleGetDisplay(mNativePointer));
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeStyleSetDisplay(long nativePointer, int display);
|
private native void jni_YGNodeStyleSetDisplay(long nativePointer, int display);
|
||||||
@Override
|
|
||||||
public void setDisplay(YogaDisplay display) {
|
public void setDisplay(YogaDisplay display) {
|
||||||
jni_YGNodeStyleSetDisplay(mNativePointer, display.intValue());
|
jni_YGNodeStyleSetDisplay(mNativePointer, display.intValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeStyleSetFlex(long nativePointer, float flex);
|
private native void jni_YGNodeStyleSetFlex(long nativePointer, float flex);
|
||||||
@Override
|
|
||||||
public void setFlex(float flex) {
|
public void setFlex(float flex) {
|
||||||
jni_YGNodeStyleSetFlex(mNativePointer, flex);
|
jni_YGNodeStyleSetFlex(mNativePointer, flex);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native float jni_YGNodeStyleGetFlexGrow(long nativePointer);
|
private native float jni_YGNodeStyleGetFlexGrow(long nativePointer);
|
||||||
@Override
|
|
||||||
public float getFlexGrow() {
|
public float getFlexGrow() {
|
||||||
return jni_YGNodeStyleGetFlexGrow(mNativePointer);
|
return jni_YGNodeStyleGetFlexGrow(mNativePointer);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeStyleSetFlexGrow(long nativePointer, float flexGrow);
|
private native void jni_YGNodeStyleSetFlexGrow(long nativePointer, float flexGrow);
|
||||||
@Override
|
|
||||||
public void setFlexGrow(float flexGrow) {
|
public void setFlexGrow(float flexGrow) {
|
||||||
jni_YGNodeStyleSetFlexGrow(mNativePointer, flexGrow);
|
jni_YGNodeStyleSetFlexGrow(mNativePointer, flexGrow);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native float jni_YGNodeStyleGetFlexShrink(long nativePointer);
|
private native float jni_YGNodeStyleGetFlexShrink(long nativePointer);
|
||||||
@Override
|
|
||||||
public float getFlexShrink() {
|
public float getFlexShrink() {
|
||||||
return jni_YGNodeStyleGetFlexShrink(mNativePointer);
|
return jni_YGNodeStyleGetFlexShrink(mNativePointer);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeStyleSetFlexShrink(long nativePointer, float flexShrink);
|
private native void jni_YGNodeStyleSetFlexShrink(long nativePointer, float flexShrink);
|
||||||
@Override
|
|
||||||
public void setFlexShrink(float flexShrink) {
|
public void setFlexShrink(float flexShrink) {
|
||||||
jni_YGNodeStyleSetFlexShrink(mNativePointer, flexShrink);
|
jni_YGNodeStyleSetFlexShrink(mNativePointer, flexShrink);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native Object jni_YGNodeStyleGetFlexBasis(long nativePointer);
|
private native Object jni_YGNodeStyleGetFlexBasis(long nativePointer);
|
||||||
@Override
|
|
||||||
public YogaValue getFlexBasis() {
|
public YogaValue getFlexBasis() {
|
||||||
return (YogaValue) jni_YGNodeStyleGetFlexBasis(mNativePointer);
|
return (YogaValue) jni_YGNodeStyleGetFlexBasis(mNativePointer);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeStyleSetFlexBasis(long nativePointer, float flexBasis);
|
private native void jni_YGNodeStyleSetFlexBasis(long nativePointer, float flexBasis);
|
||||||
@Override
|
|
||||||
public void setFlexBasis(float flexBasis) {
|
public void setFlexBasis(float flexBasis) {
|
||||||
jni_YGNodeStyleSetFlexBasis(mNativePointer, flexBasis);
|
jni_YGNodeStyleSetFlexBasis(mNativePointer, flexBasis);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeStyleSetFlexBasisPercent(long nativePointer, float percent);
|
private native void jni_YGNodeStyleSetFlexBasisPercent(long nativePointer, float percent);
|
||||||
@Override
|
|
||||||
public void setFlexBasisPercent(float percent) {
|
public void setFlexBasisPercent(float percent) {
|
||||||
jni_YGNodeStyleSetFlexBasisPercent(mNativePointer, percent);
|
jni_YGNodeStyleSetFlexBasisPercent(mNativePointer, percent);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeStyleSetFlexBasisAuto(long nativePointer);
|
private native void jni_YGNodeStyleSetFlexBasisAuto(long nativePointer);
|
||||||
@Override
|
|
||||||
public void setFlexBasisAuto() {
|
public void setFlexBasisAuto() {
|
||||||
jni_YGNodeStyleSetFlexBasisAuto(mNativePointer);
|
jni_YGNodeStyleSetFlexBasisAuto(mNativePointer);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native Object jni_YGNodeStyleGetMargin(long nativePointer, int edge);
|
private native Object jni_YGNodeStyleGetMargin(long nativePointer, int edge);
|
||||||
@Override
|
|
||||||
public YogaValue getMargin(YogaEdge edge) {
|
public YogaValue getMargin(YogaEdge edge) {
|
||||||
if (!((mEdgeSetFlag & MARGIN) == MARGIN)) {
|
if (!((mEdgeSetFlag & MARGIN) == MARGIN)) {
|
||||||
return YogaValue.UNDEFINED;
|
return YogaValue.UNDEFINED;
|
||||||
@ -404,28 +361,24 @@ public class YogaNode implements YogaNodeAPI<YogaNode> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeStyleSetMargin(long nativePointer, int edge, float margin);
|
private native void jni_YGNodeStyleSetMargin(long nativePointer, int edge, float margin);
|
||||||
@Override
|
|
||||||
public void setMargin(YogaEdge edge, float margin) {
|
public void setMargin(YogaEdge edge, float margin) {
|
||||||
mEdgeSetFlag |= MARGIN;
|
mEdgeSetFlag |= MARGIN;
|
||||||
jni_YGNodeStyleSetMargin(mNativePointer, edge.intValue(), margin);
|
jni_YGNodeStyleSetMargin(mNativePointer, edge.intValue(), margin);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeStyleSetMarginPercent(long nativePointer, int edge, float percent);
|
private native void jni_YGNodeStyleSetMarginPercent(long nativePointer, int edge, float percent);
|
||||||
@Override
|
|
||||||
public void setMarginPercent(YogaEdge edge, float percent) {
|
public void setMarginPercent(YogaEdge edge, float percent) {
|
||||||
mEdgeSetFlag |= MARGIN;
|
mEdgeSetFlag |= MARGIN;
|
||||||
jni_YGNodeStyleSetMarginPercent(mNativePointer, edge.intValue(), percent);
|
jni_YGNodeStyleSetMarginPercent(mNativePointer, edge.intValue(), percent);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeStyleSetMarginAuto(long nativePointer, int edge);
|
private native void jni_YGNodeStyleSetMarginAuto(long nativePointer, int edge);
|
||||||
@Override
|
|
||||||
public void setMarginAuto(YogaEdge edge) {
|
public void setMarginAuto(YogaEdge edge) {
|
||||||
mEdgeSetFlag |= MARGIN;
|
mEdgeSetFlag |= MARGIN;
|
||||||
jni_YGNodeStyleSetMarginAuto(mNativePointer, edge.intValue());
|
jni_YGNodeStyleSetMarginAuto(mNativePointer, edge.intValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
private native Object jni_YGNodeStyleGetPadding(long nativePointer, int edge);
|
private native Object jni_YGNodeStyleGetPadding(long nativePointer, int edge);
|
||||||
@Override
|
|
||||||
public YogaValue getPadding(YogaEdge edge) {
|
public YogaValue getPadding(YogaEdge edge) {
|
||||||
if (!((mEdgeSetFlag & PADDING) == PADDING)) {
|
if (!((mEdgeSetFlag & PADDING) == PADDING)) {
|
||||||
return YogaValue.UNDEFINED;
|
return YogaValue.UNDEFINED;
|
||||||
@ -434,21 +387,18 @@ public class YogaNode implements YogaNodeAPI<YogaNode> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeStyleSetPadding(long nativePointer, int edge, float padding);
|
private native void jni_YGNodeStyleSetPadding(long nativePointer, int edge, float padding);
|
||||||
@Override
|
|
||||||
public void setPadding(YogaEdge edge, float padding) {
|
public void setPadding(YogaEdge edge, float padding) {
|
||||||
mEdgeSetFlag |= PADDING;
|
mEdgeSetFlag |= PADDING;
|
||||||
jni_YGNodeStyleSetPadding(mNativePointer, edge.intValue(), padding);
|
jni_YGNodeStyleSetPadding(mNativePointer, edge.intValue(), padding);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeStyleSetPaddingPercent(long nativePointer, int edge, float percent);
|
private native void jni_YGNodeStyleSetPaddingPercent(long nativePointer, int edge, float percent);
|
||||||
@Override
|
|
||||||
public void setPaddingPercent(YogaEdge edge, float percent) {
|
public void setPaddingPercent(YogaEdge edge, float percent) {
|
||||||
mEdgeSetFlag |= PADDING;
|
mEdgeSetFlag |= PADDING;
|
||||||
jni_YGNodeStyleSetPaddingPercent(mNativePointer, edge.intValue(), percent);
|
jni_YGNodeStyleSetPaddingPercent(mNativePointer, edge.intValue(), percent);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native float jni_YGNodeStyleGetBorder(long nativePointer, int edge);
|
private native float jni_YGNodeStyleGetBorder(long nativePointer, int edge);
|
||||||
@Override
|
|
||||||
public float getBorder(YogaEdge edge) {
|
public float getBorder(YogaEdge edge) {
|
||||||
if (!((mEdgeSetFlag & BORDER) == BORDER)) {
|
if (!((mEdgeSetFlag & BORDER) == BORDER)) {
|
||||||
return YogaConstants.UNDEFINED;
|
return YogaConstants.UNDEFINED;
|
||||||
@ -457,14 +407,12 @@ public class YogaNode implements YogaNodeAPI<YogaNode> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeStyleSetBorder(long nativePointer, int edge, float border);
|
private native void jni_YGNodeStyleSetBorder(long nativePointer, int edge, float border);
|
||||||
@Override
|
|
||||||
public void setBorder(YogaEdge edge, float border) {
|
public void setBorder(YogaEdge edge, float border) {
|
||||||
mEdgeSetFlag |= BORDER;
|
mEdgeSetFlag |= BORDER;
|
||||||
jni_YGNodeStyleSetBorder(mNativePointer, edge.intValue(), border);
|
jni_YGNodeStyleSetBorder(mNativePointer, edge.intValue(), border);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native Object jni_YGNodeStyleGetPosition(long nativePointer, int edge);
|
private native Object jni_YGNodeStyleGetPosition(long nativePointer, int edge);
|
||||||
@Override
|
|
||||||
public YogaValue getPosition(YogaEdge edge) {
|
public YogaValue getPosition(YogaEdge edge) {
|
||||||
if (!mHasSetPosition) {
|
if (!mHasSetPosition) {
|
||||||
return YogaValue.UNDEFINED;
|
return YogaValue.UNDEFINED;
|
||||||
@ -473,135 +421,113 @@ public class YogaNode implements YogaNodeAPI<YogaNode> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeStyleSetPosition(long nativePointer, int edge, float position);
|
private native void jni_YGNodeStyleSetPosition(long nativePointer, int edge, float position);
|
||||||
@Override
|
|
||||||
public void setPosition(YogaEdge edge, float position) {
|
public void setPosition(YogaEdge edge, float position) {
|
||||||
mHasSetPosition = true;
|
mHasSetPosition = true;
|
||||||
jni_YGNodeStyleSetPosition(mNativePointer, edge.intValue(), position);
|
jni_YGNodeStyleSetPosition(mNativePointer, edge.intValue(), position);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeStyleSetPositionPercent(long nativePointer, int edge, float percent);
|
private native void jni_YGNodeStyleSetPositionPercent(long nativePointer, int edge, float percent);
|
||||||
@Override
|
|
||||||
public void setPositionPercent(YogaEdge edge, float percent) {
|
public void setPositionPercent(YogaEdge edge, float percent) {
|
||||||
mHasSetPosition = true;
|
mHasSetPosition = true;
|
||||||
jni_YGNodeStyleSetPositionPercent(mNativePointer, edge.intValue(), percent);
|
jni_YGNodeStyleSetPositionPercent(mNativePointer, edge.intValue(), percent);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native Object jni_YGNodeStyleGetWidth(long nativePointer);
|
private native Object jni_YGNodeStyleGetWidth(long nativePointer);
|
||||||
@Override
|
|
||||||
public YogaValue getWidth() {
|
public YogaValue getWidth() {
|
||||||
return (YogaValue) jni_YGNodeStyleGetWidth(mNativePointer);
|
return (YogaValue) jni_YGNodeStyleGetWidth(mNativePointer);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeStyleSetWidth(long nativePointer, float width);
|
private native void jni_YGNodeStyleSetWidth(long nativePointer, float width);
|
||||||
@Override
|
|
||||||
public void setWidth(float width) {
|
public void setWidth(float width) {
|
||||||
jni_YGNodeStyleSetWidth(mNativePointer, width);
|
jni_YGNodeStyleSetWidth(mNativePointer, width);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeStyleSetWidthPercent(long nativePointer, float percent);
|
private native void jni_YGNodeStyleSetWidthPercent(long nativePointer, float percent);
|
||||||
@Override
|
|
||||||
public void setWidthPercent(float percent) {
|
public void setWidthPercent(float percent) {
|
||||||
jni_YGNodeStyleSetWidthPercent(mNativePointer, percent);
|
jni_YGNodeStyleSetWidthPercent(mNativePointer, percent);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeStyleSetWidthAuto(long nativePointer);
|
private native void jni_YGNodeStyleSetWidthAuto(long nativePointer);
|
||||||
@Override
|
|
||||||
public void setWidthAuto() {
|
public void setWidthAuto() {
|
||||||
jni_YGNodeStyleSetWidthAuto(mNativePointer);
|
jni_YGNodeStyleSetWidthAuto(mNativePointer);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native Object jni_YGNodeStyleGetHeight(long nativePointer);
|
private native Object jni_YGNodeStyleGetHeight(long nativePointer);
|
||||||
@Override
|
|
||||||
public YogaValue getHeight() {
|
public YogaValue getHeight() {
|
||||||
return (YogaValue) jni_YGNodeStyleGetHeight(mNativePointer);
|
return (YogaValue) jni_YGNodeStyleGetHeight(mNativePointer);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeStyleSetHeight(long nativePointer, float height);
|
private native void jni_YGNodeStyleSetHeight(long nativePointer, float height);
|
||||||
@Override
|
|
||||||
public void setHeight(float height) {
|
public void setHeight(float height) {
|
||||||
jni_YGNodeStyleSetHeight(mNativePointer, height);
|
jni_YGNodeStyleSetHeight(mNativePointer, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeStyleSetHeightPercent(long nativePointer, float percent);
|
private native void jni_YGNodeStyleSetHeightPercent(long nativePointer, float percent);
|
||||||
@Override
|
|
||||||
public void setHeightPercent(float percent) {
|
public void setHeightPercent(float percent) {
|
||||||
jni_YGNodeStyleSetHeightPercent(mNativePointer, percent);
|
jni_YGNodeStyleSetHeightPercent(mNativePointer, percent);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeStyleSetHeightAuto(long nativePointer);
|
private native void jni_YGNodeStyleSetHeightAuto(long nativePointer);
|
||||||
@Override
|
|
||||||
public void setHeightAuto() {
|
public void setHeightAuto() {
|
||||||
jni_YGNodeStyleSetHeightAuto(mNativePointer);
|
jni_YGNodeStyleSetHeightAuto(mNativePointer);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native Object jni_YGNodeStyleGetMinWidth(long nativePointer);
|
private native Object jni_YGNodeStyleGetMinWidth(long nativePointer);
|
||||||
@Override
|
|
||||||
public YogaValue getMinWidth() {
|
public YogaValue getMinWidth() {
|
||||||
return (YogaValue) jni_YGNodeStyleGetMinWidth(mNativePointer);
|
return (YogaValue) jni_YGNodeStyleGetMinWidth(mNativePointer);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeStyleSetMinWidth(long nativePointer, float minWidth);
|
private native void jni_YGNodeStyleSetMinWidth(long nativePointer, float minWidth);
|
||||||
@Override
|
|
||||||
public void setMinWidth(float minWidth) {
|
public void setMinWidth(float minWidth) {
|
||||||
jni_YGNodeStyleSetMinWidth(mNativePointer, minWidth);
|
jni_YGNodeStyleSetMinWidth(mNativePointer, minWidth);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeStyleSetMinWidthPercent(long nativePointer, float percent);
|
private native void jni_YGNodeStyleSetMinWidthPercent(long nativePointer, float percent);
|
||||||
@Override
|
|
||||||
public void setMinWidthPercent(float percent) {
|
public void setMinWidthPercent(float percent) {
|
||||||
jni_YGNodeStyleSetMinWidthPercent(mNativePointer, percent);
|
jni_YGNodeStyleSetMinWidthPercent(mNativePointer, percent);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native Object jni_YGNodeStyleGetMinHeight(long nativePointer);
|
private native Object jni_YGNodeStyleGetMinHeight(long nativePointer);
|
||||||
@Override
|
|
||||||
public YogaValue getMinHeight() {
|
public YogaValue getMinHeight() {
|
||||||
return (YogaValue) jni_YGNodeStyleGetMinHeight(mNativePointer);
|
return (YogaValue) jni_YGNodeStyleGetMinHeight(mNativePointer);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeStyleSetMinHeight(long nativePointer, float minHeight);
|
private native void jni_YGNodeStyleSetMinHeight(long nativePointer, float minHeight);
|
||||||
@Override
|
|
||||||
public void setMinHeight(float minHeight) {
|
public void setMinHeight(float minHeight) {
|
||||||
jni_YGNodeStyleSetMinHeight(mNativePointer, minHeight);
|
jni_YGNodeStyleSetMinHeight(mNativePointer, minHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeStyleSetMinHeightPercent(long nativePointer, float percent);
|
private native void jni_YGNodeStyleSetMinHeightPercent(long nativePointer, float percent);
|
||||||
@Override
|
|
||||||
public void setMinHeightPercent(float percent) {
|
public void setMinHeightPercent(float percent) {
|
||||||
jni_YGNodeStyleSetMinHeightPercent(mNativePointer, percent);
|
jni_YGNodeStyleSetMinHeightPercent(mNativePointer, percent);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native Object jni_YGNodeStyleGetMaxWidth(long nativePointer);
|
private native Object jni_YGNodeStyleGetMaxWidth(long nativePointer);
|
||||||
@Override
|
|
||||||
public YogaValue getMaxWidth() {
|
public YogaValue getMaxWidth() {
|
||||||
return (YogaValue) jni_YGNodeStyleGetMaxWidth(mNativePointer);
|
return (YogaValue) jni_YGNodeStyleGetMaxWidth(mNativePointer);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeStyleSetMaxWidth(long nativePointer, float maxWidth);
|
private native void jni_YGNodeStyleSetMaxWidth(long nativePointer, float maxWidth);
|
||||||
@Override
|
|
||||||
public void setMaxWidth(float maxWidth) {
|
public void setMaxWidth(float maxWidth) {
|
||||||
jni_YGNodeStyleSetMaxWidth(mNativePointer, maxWidth);
|
jni_YGNodeStyleSetMaxWidth(mNativePointer, maxWidth);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeStyleSetMaxWidthPercent(long nativePointer, float percent);
|
private native void jni_YGNodeStyleSetMaxWidthPercent(long nativePointer, float percent);
|
||||||
@Override
|
|
||||||
public void setMaxWidthPercent(float percent) {
|
public void setMaxWidthPercent(float percent) {
|
||||||
jni_YGNodeStyleSetMaxWidthPercent(mNativePointer, percent);
|
jni_YGNodeStyleSetMaxWidthPercent(mNativePointer, percent);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native Object jni_YGNodeStyleGetMaxHeight(long nativePointer);
|
private native Object jni_YGNodeStyleGetMaxHeight(long nativePointer);
|
||||||
@Override
|
|
||||||
public YogaValue getMaxHeight() {
|
public YogaValue getMaxHeight() {
|
||||||
return (YogaValue) jni_YGNodeStyleGetMaxHeight(mNativePointer);
|
return (YogaValue) jni_YGNodeStyleGetMaxHeight(mNativePointer);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeStyleSetMaxHeight(long nativePointer, float maxheight);
|
private native void jni_YGNodeStyleSetMaxHeight(long nativePointer, float maxheight);
|
||||||
@Override
|
|
||||||
public void setMaxHeight(float maxheight) {
|
public void setMaxHeight(float maxheight) {
|
||||||
jni_YGNodeStyleSetMaxHeight(mNativePointer, maxheight);
|
jni_YGNodeStyleSetMaxHeight(mNativePointer, maxheight);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeStyleSetMaxHeightPercent(long nativePointer, float percent);
|
private native void jni_YGNodeStyleSetMaxHeightPercent(long nativePointer, float percent);
|
||||||
@Override
|
|
||||||
public void setMaxHeightPercent(float percent) {
|
public void setMaxHeightPercent(float percent) {
|
||||||
jni_YGNodeStyleSetMaxHeightPercent(mNativePointer, percent);
|
jni_YGNodeStyleSetMaxHeightPercent(mNativePointer, percent);
|
||||||
}
|
}
|
||||||
@ -616,27 +542,22 @@ public class YogaNode implements YogaNodeAPI<YogaNode> {
|
|||||||
jni_YGNodeStyleSetAspectRatio(mNativePointer, aspectRatio);
|
jni_YGNodeStyleSetAspectRatio(mNativePointer, aspectRatio);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public float getLayoutX() {
|
public float getLayoutX() {
|
||||||
return mLeft;
|
return mLeft;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public float getLayoutY() {
|
public float getLayoutY() {
|
||||||
return mTop;
|
return mTop;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public float getLayoutWidth() {
|
public float getLayoutWidth() {
|
||||||
return mWidth;
|
return mWidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public float getLayoutHeight() {
|
public float getLayoutHeight() {
|
||||||
return mHeight;
|
return mHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public float getLayoutMargin(YogaEdge edge) {
|
public float getLayoutMargin(YogaEdge edge) {
|
||||||
switch (edge) {
|
switch (edge) {
|
||||||
case LEFT:
|
case LEFT:
|
||||||
@ -656,7 +577,6 @@ public class YogaNode implements YogaNodeAPI<YogaNode> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public float getLayoutPadding(YogaEdge edge) {
|
public float getLayoutPadding(YogaEdge edge) {
|
||||||
switch (edge) {
|
switch (edge) {
|
||||||
case LEFT:
|
case LEFT:
|
||||||
@ -676,7 +596,6 @@ public class YogaNode implements YogaNodeAPI<YogaNode> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public float getLayoutBorder(YogaEdge edge) {
|
public float getLayoutBorder(YogaEdge edge) {
|
||||||
switch (edge) {
|
switch (edge) {
|
||||||
case LEFT:
|
case LEFT:
|
||||||
@ -696,13 +615,11 @@ public class YogaNode implements YogaNodeAPI<YogaNode> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public YogaDirection getLayoutDirection() {
|
public YogaDirection getLayoutDirection() {
|
||||||
return YogaDirection.fromInt(mLayoutDirection);
|
return YogaDirection.fromInt(mLayoutDirection);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeSetHasMeasureFunc(long nativePointer, boolean hasMeasureFunc);
|
private native void jni_YGNodeSetHasMeasureFunc(long nativePointer, boolean hasMeasureFunc);
|
||||||
@Override
|
|
||||||
public void setMeasureFunction(YogaMeasureFunction measureFunction) {
|
public void setMeasureFunction(YogaMeasureFunction measureFunction) {
|
||||||
mMeasureFunction = measureFunction;
|
mMeasureFunction = measureFunction;
|
||||||
jni_YGNodeSetHasMeasureFunc(mNativePointer, measureFunction != null);
|
jni_YGNodeSetHasMeasureFunc(mNativePointer, measureFunction != null);
|
||||||
@ -728,7 +645,6 @@ public class YogaNode implements YogaNodeAPI<YogaNode> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGNodeSetHasBaselineFunc(long nativePointer, boolean hasMeasureFunc);
|
private native void jni_YGNodeSetHasBaselineFunc(long nativePointer, boolean hasMeasureFunc);
|
||||||
@Override
|
|
||||||
public void setBaselineFunction(YogaBaselineFunction baselineFunction) {
|
public void setBaselineFunction(YogaBaselineFunction baselineFunction) {
|
||||||
mBaselineFunction = baselineFunction;
|
mBaselineFunction = baselineFunction;
|
||||||
jni_YGNodeSetHasBaselineFunc(mNativePointer, baselineFunction != null);
|
jni_YGNodeSetHasBaselineFunc(mNativePointer, baselineFunction != null);
|
||||||
@ -739,17 +655,14 @@ public class YogaNode implements YogaNodeAPI<YogaNode> {
|
|||||||
return mBaselineFunction.baseline(this, width, height);
|
return mBaselineFunction.baseline(this, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isMeasureDefined() {
|
public boolean isMeasureDefined() {
|
||||||
return mMeasureFunction != null;
|
return mMeasureFunction != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setData(Object data) {
|
public void setData(Object data) {
|
||||||
mData = data;
|
mData = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Object getData() {
|
public Object getData() {
|
||||||
return mData;
|
return mData;
|
||||||
}
|
}
|
||||||
|
@ -1,100 +0,0 @@
|
|||||||
/**
|
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the BSD-style license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.facebook.yoga;
|
|
||||||
|
|
||||||
// This only exists for legacy reasons. It will be removed sometime in the near future.
|
|
||||||
public interface YogaNodeAPI<YogaNodeType extends YogaNodeAPI> {
|
|
||||||
int getChildCount();
|
|
||||||
YogaNodeType getChildAt(int i);
|
|
||||||
void addChildAt(YogaNodeType child, int i);
|
|
||||||
YogaNodeType removeChildAt(int i);
|
|
||||||
YogaNodeType getParent();
|
|
||||||
int indexOf(YogaNodeType child);
|
|
||||||
void setMeasureFunction(YogaMeasureFunction measureFunction);
|
|
||||||
void setBaselineFunction(YogaBaselineFunction measureFunction);
|
|
||||||
boolean isMeasureDefined();
|
|
||||||
void calculateLayout(float width, float height);
|
|
||||||
boolean isDirty();
|
|
||||||
boolean hasNewLayout();
|
|
||||||
void dirty();
|
|
||||||
void markLayoutSeen();
|
|
||||||
void copyStyle(YogaNodeType srcNode);
|
|
||||||
YogaDirection getStyleDirection();
|
|
||||||
void setDirection(YogaDirection direction);
|
|
||||||
YogaFlexDirection getFlexDirection();
|
|
||||||
void setFlexDirection(YogaFlexDirection flexDirection);
|
|
||||||
YogaJustify getJustifyContent();
|
|
||||||
void setJustifyContent(YogaJustify justifyContent);
|
|
||||||
YogaAlign getAlignItems();
|
|
||||||
void setAlignItems(YogaAlign alignItems);
|
|
||||||
YogaAlign getAlignSelf();
|
|
||||||
void setAlignSelf(YogaAlign alignSelf);
|
|
||||||
YogaAlign getAlignContent();
|
|
||||||
void setAlignContent(YogaAlign alignContent);
|
|
||||||
YogaPositionType getPositionType();
|
|
||||||
void setPositionType(YogaPositionType positionType);
|
|
||||||
void setWrap(YogaWrap flexWrap);
|
|
||||||
void setFlex(float flex);
|
|
||||||
float getFlexGrow();
|
|
||||||
void setFlexGrow(float flexGrow);
|
|
||||||
float getFlexShrink();
|
|
||||||
void setFlexShrink(float flexShrink);
|
|
||||||
YogaValue getFlexBasis();
|
|
||||||
void setFlexBasis(float flexBasis);
|
|
||||||
void setFlexBasisPercent(float percent);
|
|
||||||
void setFlexBasisAuto();
|
|
||||||
YogaValue getMargin(YogaEdge edge);
|
|
||||||
void setMargin(YogaEdge edge, float margin);
|
|
||||||
void setMarginPercent(YogaEdge edge, float percent);
|
|
||||||
void setMarginAuto(YogaEdge edge);
|
|
||||||
YogaValue getPadding(YogaEdge edge);
|
|
||||||
void setPadding(YogaEdge edge, float padding);
|
|
||||||
void setPaddingPercent(YogaEdge edge, float percent);
|
|
||||||
float getBorder(YogaEdge edge);
|
|
||||||
void setBorder(YogaEdge edge, float border);
|
|
||||||
YogaValue getPosition(YogaEdge edge);
|
|
||||||
void setPosition(YogaEdge edge, float position);
|
|
||||||
void setPositionPercent(YogaEdge edge, float percent);
|
|
||||||
YogaValue getWidth();
|
|
||||||
void setWidth(float width);
|
|
||||||
void setWidthPercent(float percent);
|
|
||||||
void setWidthAuto();
|
|
||||||
YogaValue getHeight();
|
|
||||||
void setHeight(float height);
|
|
||||||
void setHeightPercent(float percent);
|
|
||||||
void setHeightAuto();
|
|
||||||
YogaValue getMaxWidth();
|
|
||||||
void setMaxWidth(float maxWidth);
|
|
||||||
void setMaxWidthPercent(float percent);
|
|
||||||
YogaValue getMinWidth();
|
|
||||||
void setMinWidth(float minWidth);
|
|
||||||
void setMinWidthPercent(float percent);
|
|
||||||
YogaValue getMaxHeight();
|
|
||||||
void setMaxHeight(float maxHeight);
|
|
||||||
void setMaxHeightPercent(float percent);
|
|
||||||
YogaValue getMinHeight();
|
|
||||||
void setMinHeight(float minHeight);
|
|
||||||
void setMinHeightPercent(float percent);
|
|
||||||
float getLayoutX();
|
|
||||||
float getLayoutY();
|
|
||||||
float getLayoutWidth();
|
|
||||||
float getLayoutHeight();
|
|
||||||
float getLayoutMargin(YogaEdge edge);
|
|
||||||
float getLayoutPadding(YogaEdge edge);
|
|
||||||
float getLayoutBorder(YogaEdge edge);
|
|
||||||
YogaDirection getLayoutDirection();
|
|
||||||
YogaOverflow getOverflow();
|
|
||||||
void setOverflow(YogaOverflow overflow);
|
|
||||||
YogaDisplay getDisplay();
|
|
||||||
void setDisplay(YogaDisplay display);
|
|
||||||
void setData(Object data);
|
|
||||||
Object getData();
|
|
||||||
void reset();
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user