Class Yoga
- java.lang.Object
-
- org.lwjgl.util.yoga.Yoga
-
public class Yoga extends java.lang.Object
Native bindings to Yoga.Yoga is an open-source, cross-platform layout library that implements Flexbox. Yoga’s focus is on creating an expressive layout library, not implementing all of CSS. Therefore, there are no plans to include support for tables, floats, or similar CSS concepts. Yoga also does not support styling properties that have no impact on layout, such as color or background properties.
Yoga vs Flexbox
Yoga aims to be compatible with Flexbox according to the w3 specification. However, Yoga was not developed to strictly adhere to the specification; thus, there are aspects where Yoga differs.
Default values
Yoga has chosen to change the default values of some properties to better fit mobile layout use cases. The following CSS block describes the differences in default values from the Flexbox w3 specification:
div { box-sizing: border-box; position: relative; display: flex; flex-direction: column; align-items: stretch; flex-shrink: 0; align-content: flex-start; border-width: 0px; margin: 0px; padding: 0px; min-width: 0px; }
Right-to-Left
We believe that Right-to-Left (RTL) should be a first class citizen when it comes to layout. Therefore, Yoga implements non-standard RTL support for margin, padding, border, and position properties. This enables specifying these properties as start instead of left and end instead of right.
Yoga-specific properties
The goal of Yoga is to be a library which makes layout easy. Of course, implementing Flexbox, a common and well-liked system, helps meet this goal. However, there are areas where we think Yoga can evolve beyond Flexbox and provide developers with tools not included in the Flexbox w3 specification. Currently Yoga has added one such property, AspectRatio, to solve a common problem we saw in many UIs.
-
-
Field Summary
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static long
nYGAlignToString(int value)
Unsafe version of:AlignToString
static void
nYGAssert(boolean condition, long message)
static void
nYGAssertWithConfig(long config, boolean condition, long message)
static void
nYGAssertWithNode(long node, boolean condition, long message)
static void
nYGConfigCopy(long dest, long src)
static void
nYGConfigFree(long config)
static long
nYGConfigGetContext(long config)
static boolean
nYGConfigGetUseWebDefaults(long config)
static boolean
nYGConfigIsExperimentalFeatureEnabled(long config, int feature)
Unsafe version of:ConfigIsExperimentalFeatureEnabled
static void
nYGConfigSetCloneNodeFunc(long config, long callback)
static void
nYGConfigSetContext(long config, long context)
static void
nYGConfigSetExperimentalFeatureEnabled(long config, int feature, boolean enabled)
Unsafe version of:ConfigSetExperimentalFeatureEnabled
static void
nYGConfigSetLogger(long config, long logger)
static void
nYGConfigSetPointScaleFactor(long config, float pixelsInPoint)
Unsafe version of:ConfigSetPointScaleFactor
static void
nYGConfigSetPrintTreeFlag(long config, boolean enabled)
static void
nYGConfigSetShouldDiffLayoutWithoutLegacyStretchBehaviour(long config, boolean shouldDiffLayout)
static void
nYGConfigSetUseLegacyStretchBehaviour(long config, boolean useLegacyStretchBehaviour)
Unsafe version of:ConfigSetUseLegacyStretchBehaviour
static void
nYGConfigSetUseWebDefaults(long config, boolean enabled)
Unsafe version of:ConfigSetUseWebDefaults
static long
nYGDimensionToString(int value)
Unsafe version of:DimensionToString
static long
nYGDirectionToString(int value)
Unsafe version of:DirectionToString
static long
nYGDisplayToString(int value)
Unsafe version of:DisplayToString
static long
nYGEdgeToString(int value)
Unsafe version of:EdgeToString
static long
nYGExperimentalFeatureToString(int value)
Unsafe version of:ExperimentalFeatureToString
static long
nYGFlexDirectionToString(int value)
Unsafe version of:FlexDirectionToString
static long
nYGJustifyToString(int value)
Unsafe version of:JustifyToString
static long
nYGLogLevelToString(int value)
Unsafe version of:LogLevelToString
static long
nYGMeasureModeToString(int value)
Unsafe version of:MeasureModeToString
static void
nYGNodeCalculateLayout(long node, float availableWidth, float availableHeight, int ownerDirection)
Unsafe version of:NodeCalculateLayout
static boolean
nYGNodeCanUseCachedMeasurement(int widthMode, float width, int heightMode, float height, int lastWidthMode, float lastWidth, int lastHeightMode, float lastHeight, float lastComputedWidth, float lastComputedHeight, float marginRow, float marginColumn, long config)
Unsafe version of:NodeCanUseCachedMeasurement
static long
nYGNodeClone(long node)
static void
nYGNodeCopyStyle(long dstNode, long srcNode)
static void
nYGNodeFree(long node)
static void
nYGNodeFreeRecursive(long node)
static void
nYGNodeFreeRecursiveWithCleanupFunc(long node, long cleanup)
static long
nYGNodeGetChild(long node, int index)
static int
nYGNodeGetChildCount(long node)
static long
nYGNodeGetContext(long node)
static long
nYGNodeGetDirtiedFunc(long node)
static boolean
nYGNodeGetHasNewLayout(long node)
static int
nYGNodeGetNodeType(long node)
static long
nYGNodeGetOwner(long node)
static long
nYGNodeGetParent(long node)
static boolean
nYGNodeHasBaselineFunc(long node)
static boolean
nYGNodeHasMeasureFunc(long node)
static void
nYGNodeInsertChild(long node, long child, int index)
static boolean
nYGNodeIsDirty(long node)
static boolean
nYGNodeIsReferenceBaseline(long node)
static float
nYGNodeLayoutGetBorder(long node, int edge)
Unsafe version of:NodeLayoutGetBorder
static float
nYGNodeLayoutGetBottom(long node)
static boolean
nYGNodeLayoutGetDidLegacyStretchFlagAffectLayout(long node)
static boolean
nYGNodeLayoutGetDidUseLegacyFlag(long node)
static int
nYGNodeLayoutGetDirection(long node)
static boolean
nYGNodeLayoutGetHadOverflow(long node)
static float
nYGNodeLayoutGetHeight(long node)
static float
nYGNodeLayoutGetLeft(long node)
static float
nYGNodeLayoutGetMargin(long node, int edge)
Unsafe version of:NodeLayoutGetMargin
static float
nYGNodeLayoutGetPadding(long node, int edge)
Unsafe version of:NodeLayoutGetPadding
static float
nYGNodeLayoutGetRight(long node)
static float
nYGNodeLayoutGetTop(long node)
static float
nYGNodeLayoutGetWidth(long node)
static void
nYGNodeMarkDirty(long node)
Unsafe version of:NodeMarkDirty
static void
nYGNodeMarkDirtyAndPropogateToDescendants(long node)
Unsafe version of:NodeMarkDirtyAndPropogateToDescendants
static long
nYGNodeNewWithConfig(long config)
static void
nYGNodeRemoveAllChildren(long node)
static void
nYGNodeRemoveChild(long node, long child)
static void
nYGNodeReset(long node)
static void
nYGNodeSetBaselineFunc(long node, long baselineFunc)
static void
nYGNodeSetChildren(long owner, long children, int count)
static void
nYGNodeSetContext(long node, long context)
static void
nYGNodeSetDirtiedFunc(long node, long dirtiedFunc)
static void
nYGNodeSetHasNewLayout(long node, boolean hasNewLayout)
static void
nYGNodeSetIsReferenceBaseline(long node, boolean isReferenceBaseline)
static void
nYGNodeSetMeasureFunc(long node, long measureFunc)
static void
nYGNodeSetNodeType(long node, int nodeType)
static void
nYGNodeSetPrintFunc(long node, long printFunc)
static int
nYGNodeStyleGetAlignContent(long node)
static int
nYGNodeStyleGetAlignItems(long node)
static int
nYGNodeStyleGetAlignSelf(long node)
static float
nYGNodeStyleGetAspectRatio(long node)
static float
nYGNodeStyleGetBorder(long node, int edge)
Unsafe version of:NodeStyleGetBorder
static int
nYGNodeStyleGetDirection(long node)
static int
nYGNodeStyleGetDisplay(long node)
static float
nYGNodeStyleGetFlex(long node)
static void
nYGNodeStyleGetFlexBasis(long node, long __result)
static int
nYGNodeStyleGetFlexDirection(long node)
static float
nYGNodeStyleGetFlexGrow(long node)
static float
nYGNodeStyleGetFlexShrink(long node)
static int
nYGNodeStyleGetFlexWrap(long node)
static void
nYGNodeStyleGetHeight(long node, long __result)
static int
nYGNodeStyleGetJustifyContent(long node)
static void
nYGNodeStyleGetMargin(long node, int edge, long __result)
Unsafe version of:NodeStyleGetMargin
static void
nYGNodeStyleGetMaxHeight(long node, long __result)
static void
nYGNodeStyleGetMaxWidth(long node, long __result)
static void
nYGNodeStyleGetMinHeight(long node, long __result)
static void
nYGNodeStyleGetMinWidth(long node, long __result)
static int
nYGNodeStyleGetOverflow(long node)
static void
nYGNodeStyleGetPadding(long node, int edge, long __result)
Unsafe version of:NodeStyleGetPadding
static void
nYGNodeStyleGetPosition(long node, int edge, long __result)
Unsafe version of:NodeStyleGetPosition
static int
nYGNodeStyleGetPositionType(long node)
static void
nYGNodeStyleGetWidth(long node, long __result)
static void
nYGNodeStyleSetAlignContent(long node, int alignContent)
Unsafe version of:NodeStyleSetAlignContent
static void
nYGNodeStyleSetAlignItems(long node, int alignItems)
Unsafe version of:NodeStyleSetAlignItems
static void
nYGNodeStyleSetAlignSelf(long node, int alignSelf)
Unsafe version of:NodeStyleSetAlignSelf
static void
nYGNodeStyleSetAspectRatio(long node, float aspectRatio)
Unsafe version of:NodeStyleSetAspectRatio
static void
nYGNodeStyleSetBorder(long node, int edge, float border)
Unsafe version of:NodeStyleSetBorder
static void
nYGNodeStyleSetDirection(long node, int direction)
Unsafe version of:NodeStyleSetDirection
static void
nYGNodeStyleSetDisplay(long node, int display)
Unsafe version of:NodeStyleSetDisplay
static void
nYGNodeStyleSetFlex(long node, float flex)
static void
nYGNodeStyleSetFlexBasis(long node, float flexBasis)
static void
nYGNodeStyleSetFlexBasisAuto(long node)
static void
nYGNodeStyleSetFlexBasisPercent(long node, float flexBasis)
static void
nYGNodeStyleSetFlexDirection(long node, int flexDirection)
Unsafe version of:NodeStyleSetFlexDirection
static void
nYGNodeStyleSetFlexGrow(long node, float flexGrow)
static void
nYGNodeStyleSetFlexShrink(long node, float flexShrink)
static void
nYGNodeStyleSetFlexWrap(long node, int flexWrap)
Unsafe version of:NodeStyleSetFlexWrap
static void
nYGNodeStyleSetHeight(long node, float height)
static void
nYGNodeStyleSetHeightAuto(long node)
static void
nYGNodeStyleSetHeightPercent(long node, float height)
static void
nYGNodeStyleSetJustifyContent(long node, int justifyContent)
Unsafe version of:NodeStyleSetJustifyContent
static void
nYGNodeStyleSetMargin(long node, int edge, float margin)
Unsafe version of:NodeStyleSetMargin
static void
nYGNodeStyleSetMarginAuto(long node, int edge)
Unsafe version of:NodeStyleSetMarginAuto
static void
nYGNodeStyleSetMarginPercent(long node, int edge, float margin)
Unsafe version of:NodeStyleSetMarginPercent
static void
nYGNodeStyleSetMaxHeight(long node, float maxHeight)
static void
nYGNodeStyleSetMaxHeightPercent(long node, float maxHeight)
static void
nYGNodeStyleSetMaxWidth(long node, float maxWidth)
static void
nYGNodeStyleSetMaxWidthPercent(long node, float maxWidth)
static void
nYGNodeStyleSetMinHeight(long node, float minHeight)
static void
nYGNodeStyleSetMinHeightPercent(long node, float minHeight)
static void
nYGNodeStyleSetMinWidth(long node, float minWidth)
static void
nYGNodeStyleSetMinWidthPercent(long node, float minWidth)
static void
nYGNodeStyleSetOverflow(long node, int overflow)
Unsafe version of:NodeStyleSetOverflow
static void
nYGNodeStyleSetPadding(long node, int edge, float padding)
Unsafe version of:NodeStyleSetPadding
static void
nYGNodeStyleSetPaddingPercent(long node, int edge, float padding)
Unsafe version of:NodeStyleSetPaddingPercent
static void
nYGNodeStyleSetPosition(long node, int edge, float position)
Unsafe version of:NodeStyleSetPosition
static void
nYGNodeStyleSetPositionPercent(long node, int edge, float position)
Unsafe version of:NodeStyleSetPositionPercent
static void
nYGNodeStyleSetPositionType(long node, int positionType)
Unsafe version of:NodeStyleSetPositionType
static void
nYGNodeStyleSetWidth(long node, float width)
static void
nYGNodeStyleSetWidthAuto(long node)
static void
nYGNodeStyleSetWidthPercent(long node, float width)
static long
nYGNodeTypeToString(int value)
Unsafe version of:NodeTypeToString
static long
nYGOverflowToString(int value)
Unsafe version of:OverflowToString
static long
nYGPositionTypeToString(int value)
Unsafe version of:PositionTypeToString
static long
nYGUnitToString(int value)
Unsafe version of:UnitToString
static long
nYGWrapToString(int value)
Unsafe version of:WrapToString
static java.lang.String
YGAlignToString(int value)
static void
YGAssert(boolean condition, java.lang.CharSequence message)
static void
YGAssert(boolean condition, java.nio.ByteBuffer message)
static void
YGAssertWithConfig(long config, boolean condition, java.lang.CharSequence message)
static void
YGAssertWithConfig(long config, boolean condition, java.nio.ByteBuffer message)
static void
YGAssertWithNode(long node, boolean condition, java.lang.CharSequence message)
static void
YGAssertWithNode(long node, boolean condition, java.nio.ByteBuffer message)
static void
YGConfigCopy(long dest, long src)
static void
YGConfigFree(long config)
static long
YGConfigGetContext(long config)
static long
YGConfigGetDefault()
static int
YGConfigGetInstanceCount()
static boolean
YGConfigGetUseWebDefaults(long config)
static boolean
YGConfigIsExperimentalFeatureEnabled(long config, int feature)
static long
YGConfigNew()
static void
YGConfigSetCloneNodeFunc(long config, YGCloneNodeFuncI callback)
static void
YGConfigSetContext(long config, long context)
static void
YGConfigSetExperimentalFeatureEnabled(long config, int feature, boolean enabled)
static void
YGConfigSetLogger(long config, YGLoggerI logger)
static void
YGConfigSetPointScaleFactor(long config, float pixelsInPoint)
Set this to number of pixels in 1 point to round calculation results.static void
YGConfigSetPrintTreeFlag(long config, boolean enabled)
static void
YGConfigSetShouldDiffLayoutWithoutLegacyStretchBehaviour(long config, boolean shouldDiffLayout)
static void
YGConfigSetUseLegacyStretchBehaviour(long config, boolean useLegacyStretchBehaviour)
Yoga previously had an error where containers would take the maximum space possible instead of the minimum like they are supposed to.static void
YGConfigSetUseWebDefaults(long config, boolean enabled)
Using the web defaults is the preferred configuration for new projects.static java.lang.String
YGDimensionToString(int value)
static java.lang.String
YGDirectionToString(int value)
static java.lang.String
YGDisplayToString(int value)
static java.lang.String
YGEdgeToString(int value)
static java.lang.String
YGExperimentalFeatureToString(int value)
static java.lang.String
YGFlexDirectionToString(int value)
static boolean
YGFloatIsUndefined(float value)
static java.lang.String
YGJustifyToString(int value)
static java.lang.String
YGLogLevelToString(int value)
static java.lang.String
YGMeasureModeToString(int value)
static void
YGNodeCalculateLayout(long node, float availableWidth, float availableHeight, int ownerDirection)
static boolean
YGNodeCanUseCachedMeasurement(int widthMode, float width, int heightMode, float height, int lastWidthMode, float lastWidth, int lastHeightMode, float lastHeight, float lastComputedWidth, float lastComputedHeight, float marginRow, float marginColumn, long config)
static long
YGNodeClone(long node)
static void
YGNodeCopyStyle(long dstNode, long srcNode)
static void
YGNodeFree(long node)
static void
YGNodeFreeRecursive(long node)
static void
YGNodeFreeRecursiveWithCleanupFunc(long node, YGNodeCleanupFuncI cleanup)
static long
YGNodeGetChild(long node, int index)
static int
YGNodeGetChildCount(long node)
static long
YGNodeGetContext(long node)
static YGDirtiedFunc
YGNodeGetDirtiedFunc(long node)
static boolean
YGNodeGetHasNewLayout(long node)
static int
YGNodeGetNodeType(long node)
static long
YGNodeGetOwner(long node)
static long
YGNodeGetParent(long node)
static boolean
YGNodeHasBaselineFunc(long node)
static boolean
YGNodeHasMeasureFunc(long node)
static void
YGNodeInsertChild(long node, long child, int index)
static boolean
YGNodeIsDirty(long node)
static boolean
YGNodeIsReferenceBaseline(long node)
static float
YGNodeLayoutGetBorder(long node, int edge)
Gets the computed value for this nodes after performing layout.static float
YGNodeLayoutGetBottom(long node)
static boolean
YGNodeLayoutGetDidLegacyStretchFlagAffectLayout(long node)
static boolean
YGNodeLayoutGetDidUseLegacyFlag(long node)
static int
YGNodeLayoutGetDirection(long node)
static boolean
YGNodeLayoutGetHadOverflow(long node)
static float
YGNodeLayoutGetHeight(long node)
static float
YGNodeLayoutGetLeft(long node)
static float
YGNodeLayoutGetMargin(long node, int edge)
Gets the computed value for this nodes after performing layout.static float
YGNodeLayoutGetPadding(long node, int edge)
Gets the computed value for this nodes after performing layout.static float
YGNodeLayoutGetRight(long node)
static float
YGNodeLayoutGetTop(long node)
static float
YGNodeLayoutGetWidth(long node)
static void
YGNodeMarkDirty(long node)
Marks a node as dirty.static void
YGNodeMarkDirtyAndPropogateToDescendants(long node)
Marks the current node and all its descendants as dirty.static long
YGNodeNew()
static long
YGNodeNewWithConfig(long config)
static void
YGNodeRemoveAllChildren(long node)
static void
YGNodeRemoveChild(long node, long child)
static void
YGNodeReset(long node)
static void
YGNodeSetBaselineFunc(long node, YGBaselineFuncI baselineFunc)
static void
YGNodeSetChildren(long owner, org.lwjgl.PointerBuffer children)
static void
YGNodeSetContext(long node, long context)
static void
YGNodeSetDirtiedFunc(long node, YGDirtiedFuncI dirtiedFunc)
static void
YGNodeSetHasNewLayout(long node, boolean hasNewLayout)
static void
YGNodeSetIsReferenceBaseline(long node, boolean isReferenceBaseline)
static void
YGNodeSetMeasureFunc(long node, YGMeasureFuncI measureFunc)
static void
YGNodeSetNodeType(long node, int nodeType)
static void
YGNodeSetPrintFunc(long node, YGPrintFuncI printFunc)
static int
YGNodeStyleGetAlignContent(long node)
static int
YGNodeStyleGetAlignItems(long node)
static int
YGNodeStyleGetAlignSelf(long node)
static float
YGNodeStyleGetAspectRatio(long node)
static float
YGNodeStyleGetBorder(long node, int edge)
static int
YGNodeStyleGetDirection(long node)
static int
YGNodeStyleGetDisplay(long node)
static float
YGNodeStyleGetFlex(long node)
static YGValue
YGNodeStyleGetFlexBasis(long node, YGValue __result)
static int
YGNodeStyleGetFlexDirection(long node)
static float
YGNodeStyleGetFlexGrow(long node)
static float
YGNodeStyleGetFlexShrink(long node)
static int
YGNodeStyleGetFlexWrap(long node)
static YGValue
YGNodeStyleGetHeight(long node, YGValue __result)
static int
YGNodeStyleGetJustifyContent(long node)
static YGValue
YGNodeStyleGetMargin(long node, int edge, YGValue __result)
static YGValue
YGNodeStyleGetMaxHeight(long node, YGValue __result)
static YGValue
YGNodeStyleGetMaxWidth(long node, YGValue __result)
static YGValue
YGNodeStyleGetMinHeight(long node, YGValue __result)
static YGValue
YGNodeStyleGetMinWidth(long node, YGValue __result)
static int
YGNodeStyleGetOverflow(long node)
static YGValue
YGNodeStyleGetPadding(long node, int edge, YGValue __result)
static YGValue
YGNodeStyleGetPosition(long node, int edge, YGValue __result)
static int
YGNodeStyleGetPositionType(long node)
static YGValue
YGNodeStyleGetWidth(long node, YGValue __result)
static void
YGNodeStyleSetAlignContent(long node, int alignContent)
static void
YGNodeStyleSetAlignItems(long node, int alignItems)
static void
YGNodeStyleSetAlignSelf(long node, int alignSelf)
static void
YGNodeStyleSetAspectRatio(long node, float aspectRatio)
Aspect ratio controls the size of the undefined dimension of a node.static void
YGNodeStyleSetBorder(long node, int edge, float border)
static void
YGNodeStyleSetDirection(long node, int direction)
static void
YGNodeStyleSetDisplay(long node, int display)
static void
YGNodeStyleSetFlex(long node, float flex)
static void
YGNodeStyleSetFlexBasis(long node, float flexBasis)
static void
YGNodeStyleSetFlexBasisAuto(long node)
static void
YGNodeStyleSetFlexBasisPercent(long node, float flexBasis)
static void
YGNodeStyleSetFlexDirection(long node, int flexDirection)
static void
YGNodeStyleSetFlexGrow(long node, float flexGrow)
static void
YGNodeStyleSetFlexShrink(long node, float flexShrink)
static void
YGNodeStyleSetFlexWrap(long node, int flexWrap)
static void
YGNodeStyleSetHeight(long node, float height)
static void
YGNodeStyleSetHeightAuto(long node)
static void
YGNodeStyleSetHeightPercent(long node, float height)
static void
YGNodeStyleSetJustifyContent(long node, int justifyContent)
static void
YGNodeStyleSetMargin(long node, int edge, float margin)
static void
YGNodeStyleSetMarginAuto(long node, int edge)
static void
YGNodeStyleSetMarginPercent(long node, int edge, float margin)
static void
YGNodeStyleSetMaxHeight(long node, float maxHeight)
static void
YGNodeStyleSetMaxHeightPercent(long node, float maxHeight)
static void
YGNodeStyleSetMaxWidth(long node, float maxWidth)
static void
YGNodeStyleSetMaxWidthPercent(long node, float maxWidth)
static void
YGNodeStyleSetMinHeight(long node, float minHeight)
static void
YGNodeStyleSetMinHeightPercent(long node, float minHeight)
static void
YGNodeStyleSetMinWidth(long node, float minWidth)
static void
YGNodeStyleSetMinWidthPercent(long node, float minWidth)
static void
YGNodeStyleSetOverflow(long node, int overflow)
static void
YGNodeStyleSetPadding(long node, int edge, float padding)
static void
YGNodeStyleSetPaddingPercent(long node, int edge, float padding)
static void
YGNodeStyleSetPosition(long node, int edge, float position)
static void
YGNodeStyleSetPositionPercent(long node, int edge, float position)
static void
YGNodeStyleSetPositionType(long node, int positionType)
static void
YGNodeStyleSetWidth(long node, float width)
static void
YGNodeStyleSetWidthAuto(long node)
static void
YGNodeStyleSetWidthPercent(long node, float width)
static java.lang.String
YGNodeTypeToString(int value)
static java.lang.String
YGOverflowToString(int value)
static java.lang.String
YGPositionTypeToString(int value)
static float
YGRoundValueToPixelGrid(float value, float pointScaleFactor, boolean forceCeil, boolean forceFloor)
static java.lang.String
YGUnitToString(int value)
static java.lang.String
YGWrapToString(int value)
-
-
-
Field Detail
-
YGUndefined
- See Also:
- Constant Field Values
-
YGAlignAuto, YGAlignFlexStart, YGAlignCenter, YGAlignFlexEnd, YGAlignStretch, YGAlignBaseline, YGAlignSpaceBetween, YGAlignSpaceAround
YGAlignEnum values:
-
YGDimensionWidth, YGDimensionHeight
YGDimensionEnum values:
-
YGDirectionInherit, YGDirectionLTR, YGDirectionRTL
YGDirectionEnum values:
-
YGDisplayFlex, YGDisplayNone
YGDisplayEnum values:
-
YGEdgeLeft, YGEdgeTop, YGEdgeRight, YGEdgeBottom, YGEdgeStart, YGEdgeEnd, YGEdgeHorizontal, YGEdgeVertical, YGEdgeAll
YGEdgeEnum values:
-
YGExperimentalFeatureWebFlexBasis
YGExperimentalFeature
-
YGFlexDirectionColumn, YGFlexDirectionColumnReverse, YGFlexDirectionRow, YGFlexDirectionRowReverse
YGFlexDirectionEnum values:
-
YGJustifyFlexStart, YGJustifyCenter, YGJustifyFlexEnd, YGJustifySpaceBetween, YGJustifySpaceAround, YGJustifySpaceEvenly
YGJustifyEnum values:
-
YGLogLevelError, YGLogLevelWarn, YGLogLevelInfo, YGLogLevelDebug, YGLogLevelVerbose, YGLogLevelFatal
YGLogLevelEnum values:
-
YGMeasureModeUndefined, YGMeasureModeExactly, YGMeasureModeAtMost
YGMeasureModeEnum values:
-
YGNodeTypeDefault, YGNodeTypeText
YGNodeTypeEnum values:
-
YGOverflowVisible, YGOverflowHidden, YGOverflowScroll
YGOverflowEnum values:
-
YGPositionTypeRelative, YGPositionTypeAbsolute
YGPositionTypeEnum values:
-
YGUnitUndefined, YGUnitPoint, YGUnitPercent, YGUnitAuto
YGUnitEnum values:
-
YGWrapNoWrap, YGWrapWrap, YGWrapReverse
YGWrapEnum values:
-
YGValueAuto
-
YGValueUndefined
public static final YGValue YGValueUndefined
-
YGValueZero
-
-
Method Detail
-
YGNodeNew
public static long YGNodeNew()
-
nYGNodeNewWithConfig
public static long nYGNodeNewWithConfig(long config)
-
YGNodeNewWithConfig
public static long YGNodeNewWithConfig(long config)
-
nYGNodeClone
public static long nYGNodeClone(long node)
-
YGNodeClone
public static long YGNodeClone(long node)
-
nYGNodeFree
public static void nYGNodeFree(long node)
-
YGNodeFree
public static void YGNodeFree(long node)
-
nYGNodeFreeRecursiveWithCleanupFunc
public static void nYGNodeFreeRecursiveWithCleanupFunc(long node, long cleanup)
-
YGNodeFreeRecursiveWithCleanupFunc
public static void YGNodeFreeRecursiveWithCleanupFunc(long node, YGNodeCleanupFuncI cleanup)
-
nYGNodeFreeRecursive
public static void nYGNodeFreeRecursive(long node)
-
YGNodeFreeRecursive
public static void YGNodeFreeRecursive(long node)
-
nYGNodeReset
public static void nYGNodeReset(long node)
-
YGNodeReset
public static void YGNodeReset(long node)
-
nYGNodeInsertChild
public static void nYGNodeInsertChild(long node, long child, int index)
-
YGNodeInsertChild
public static void YGNodeInsertChild(long node, long child, int index)
-
nYGNodeRemoveChild
public static void nYGNodeRemoveChild(long node, long child)
-
YGNodeRemoveChild
public static void YGNodeRemoveChild(long node, long child)
-
nYGNodeRemoveAllChildren
public static void nYGNodeRemoveAllChildren(long node)
-
YGNodeRemoveAllChildren
public static void YGNodeRemoveAllChildren(long node)
-
nYGNodeGetChild
public static long nYGNodeGetChild(long node, int index)
-
YGNodeGetChild
public static long YGNodeGetChild(long node, int index)
-
nYGNodeGetOwner
public static long nYGNodeGetOwner(long node)
-
YGNodeGetOwner
public static long YGNodeGetOwner(long node)
-
nYGNodeGetParent
public static long nYGNodeGetParent(long node)
-
YGNodeGetParent
public static long YGNodeGetParent(long node)
-
nYGNodeGetChildCount
public static int nYGNodeGetChildCount(long node)
-
YGNodeGetChildCount
public static int YGNodeGetChildCount(long node)
-
nYGNodeSetChildren
public static void nYGNodeSetChildren(long owner, long children, int count)
-
YGNodeSetChildren
public static void YGNodeSetChildren(long owner, org.lwjgl.PointerBuffer children)
-
nYGNodeSetIsReferenceBaseline
public static void nYGNodeSetIsReferenceBaseline(long node, boolean isReferenceBaseline)
-
YGNodeSetIsReferenceBaseline
public static void YGNodeSetIsReferenceBaseline(long node, boolean isReferenceBaseline)
-
nYGNodeIsReferenceBaseline
public static boolean nYGNodeIsReferenceBaseline(long node)
-
YGNodeIsReferenceBaseline
public static boolean YGNodeIsReferenceBaseline(long node)
-
nYGNodeCalculateLayout
public static void nYGNodeCalculateLayout(long node, float availableWidth, float availableHeight, int ownerDirection)
Unsafe version of:NodeCalculateLayout
-
YGNodeCalculateLayout
public static void YGNodeCalculateLayout(long node, float availableWidth, float availableHeight, int ownerDirection)
- Parameters:
ownerDirection
- one of:DirectionInherit
DirectionLTR
DirectionRTL
-
nYGNodeMarkDirty
public static void nYGNodeMarkDirty(long node)
Unsafe version of:NodeMarkDirty
-
YGNodeMarkDirty
public static void YGNodeMarkDirty(long node)
Marks a node as dirty.Only valid for nodes with a custom measure function set.
Yoga knows when to mark all other nodes as dirty but because nodes with measure functions depend on information not known to Yoga they must perform this dirty marking manually.
-
nYGNodeMarkDirtyAndPropogateToDescendants
public static void nYGNodeMarkDirtyAndPropogateToDescendants(long node)
Unsafe version of:NodeMarkDirtyAndPropogateToDescendants
-
YGNodeMarkDirtyAndPropogateToDescendants
public static void YGNodeMarkDirtyAndPropogateToDescendants(long node)
Marks the current node and all its descendants as dirty.Intended to be used for Yoga benchmarks. Don't use in production, as calling
NodeCalculateLayout
will cause the recalculation of each and every node.
-
YGFloatIsUndefined
public static boolean YGFloatIsUndefined(float value)
-
nYGNodeCanUseCachedMeasurement
public static boolean nYGNodeCanUseCachedMeasurement(int widthMode, float width, int heightMode, float height, int lastWidthMode, float lastWidth, int lastHeightMode, float lastHeight, float lastComputedWidth, float lastComputedHeight, float marginRow, float marginColumn, long config)
Unsafe version of:NodeCanUseCachedMeasurement
-
YGNodeCanUseCachedMeasurement
public static boolean YGNodeCanUseCachedMeasurement(int widthMode, float width, int heightMode, float height, int lastWidthMode, float lastWidth, int lastHeightMode, float lastHeight, float lastComputedWidth, float lastComputedHeight, float marginRow, float marginColumn, long config)
- Parameters:
widthMode
- one of:MeasureModeUndefined
MeasureModeExactly
MeasureModeAtMost
-
nYGNodeCopyStyle
public static void nYGNodeCopyStyle(long dstNode, long srcNode)
-
YGNodeCopyStyle
public static void YGNodeCopyStyle(long dstNode, long srcNode)
-
nYGNodeGetContext
public static long nYGNodeGetContext(long node)
-
YGNodeGetContext
public static long YGNodeGetContext(long node)
-
nYGNodeSetContext
public static void nYGNodeSetContext(long node, long context)
-
YGNodeSetContext
public static void YGNodeSetContext(long node, long context)
-
nYGConfigSetPrintTreeFlag
public static void nYGConfigSetPrintTreeFlag(long config, boolean enabled)
-
YGConfigSetPrintTreeFlag
public static void YGConfigSetPrintTreeFlag(long config, boolean enabled)
-
nYGNodeHasMeasureFunc
public static boolean nYGNodeHasMeasureFunc(long node)
-
YGNodeHasMeasureFunc
public static boolean YGNodeHasMeasureFunc(long node)
-
nYGNodeSetMeasureFunc
public static void nYGNodeSetMeasureFunc(long node, long measureFunc)
-
YGNodeSetMeasureFunc
public static void YGNodeSetMeasureFunc(long node, @Nullable YGMeasureFuncI measureFunc)
-
nYGNodeHasBaselineFunc
public static boolean nYGNodeHasBaselineFunc(long node)
-
YGNodeHasBaselineFunc
public static boolean YGNodeHasBaselineFunc(long node)
-
nYGNodeSetBaselineFunc
public static void nYGNodeSetBaselineFunc(long node, long baselineFunc)
-
YGNodeSetBaselineFunc
public static void YGNodeSetBaselineFunc(long node, @Nullable YGBaselineFuncI baselineFunc)
-
nYGNodeGetDirtiedFunc
public static long nYGNodeGetDirtiedFunc(long node)
-
YGNodeGetDirtiedFunc
@Nullable public static YGDirtiedFunc YGNodeGetDirtiedFunc(long node)
-
nYGNodeSetDirtiedFunc
public static void nYGNodeSetDirtiedFunc(long node, long dirtiedFunc)
-
YGNodeSetDirtiedFunc
public static void YGNodeSetDirtiedFunc(long node, @Nullable YGDirtiedFuncI dirtiedFunc)
-
nYGNodeSetPrintFunc
public static void nYGNodeSetPrintFunc(long node, long printFunc)
-
YGNodeSetPrintFunc
public static void YGNodeSetPrintFunc(long node, @Nullable YGPrintFuncI printFunc)
-
nYGNodeGetHasNewLayout
public static boolean nYGNodeGetHasNewLayout(long node)
-
YGNodeGetHasNewLayout
public static boolean YGNodeGetHasNewLayout(long node)
-
nYGNodeSetHasNewLayout
public static void nYGNodeSetHasNewLayout(long node, boolean hasNewLayout)
-
YGNodeSetHasNewLayout
public static void YGNodeSetHasNewLayout(long node, boolean hasNewLayout)
-
nYGNodeGetNodeType
public static int nYGNodeGetNodeType(long node)
-
YGNodeGetNodeType
public static int YGNodeGetNodeType(long node)
-
nYGNodeSetNodeType
public static void nYGNodeSetNodeType(long node, int nodeType)
-
YGNodeSetNodeType
public static void YGNodeSetNodeType(long node, int nodeType)
-
nYGNodeIsDirty
public static boolean nYGNodeIsDirty(long node)
-
YGNodeIsDirty
public static boolean YGNodeIsDirty(long node)
-
nYGNodeLayoutGetDidUseLegacyFlag
public static boolean nYGNodeLayoutGetDidUseLegacyFlag(long node)
-
YGNodeLayoutGetDidUseLegacyFlag
public static boolean YGNodeLayoutGetDidUseLegacyFlag(long node)
-
nYGNodeStyleSetDirection
public static void nYGNodeStyleSetDirection(long node, int direction)
Unsafe version of:NodeStyleSetDirection
-
YGNodeStyleSetDirection
public static void YGNodeStyleSetDirection(long node, int direction)
- Parameters:
direction
- one of:DirectionInherit
DirectionLTR
DirectionRTL
-
nYGNodeStyleGetDirection
public static int nYGNodeStyleGetDirection(long node)
-
YGNodeStyleGetDirection
public static int YGNodeStyleGetDirection(long node)
-
nYGNodeStyleSetFlexDirection
public static void nYGNodeStyleSetFlexDirection(long node, int flexDirection)
Unsafe version of:NodeStyleSetFlexDirection
-
YGNodeStyleSetFlexDirection
public static void YGNodeStyleSetFlexDirection(long node, int flexDirection)
- Parameters:
flexDirection
- one of:FlexDirectionColumn
FlexDirectionColumnReverse
FlexDirectionRow
FlexDirectionRowReverse
-
nYGNodeStyleGetFlexDirection
public static int nYGNodeStyleGetFlexDirection(long node)
-
YGNodeStyleGetFlexDirection
public static int YGNodeStyleGetFlexDirection(long node)
-
nYGNodeStyleSetJustifyContent
public static void nYGNodeStyleSetJustifyContent(long node, int justifyContent)
Unsafe version of:NodeStyleSetJustifyContent
-
YGNodeStyleSetJustifyContent
public static void YGNodeStyleSetJustifyContent(long node, int justifyContent)
- Parameters:
justifyContent
- one of:JustifyFlexStart
JustifyCenter
JustifyFlexEnd
JustifySpaceBetween
JustifySpaceAround
JustifySpaceEvenly
-
nYGNodeStyleGetJustifyContent
public static int nYGNodeStyleGetJustifyContent(long node)
-
YGNodeStyleGetJustifyContent
public static int YGNodeStyleGetJustifyContent(long node)
-
nYGNodeStyleSetAlignContent
public static void nYGNodeStyleSetAlignContent(long node, int alignContent)
Unsafe version of:NodeStyleSetAlignContent
-
YGNodeStyleSetAlignContent
public static void YGNodeStyleSetAlignContent(long node, int alignContent)
- Parameters:
alignContent
- one of:AlignAuto
AlignFlexStart
AlignCenter
AlignFlexEnd
AlignStretch
AlignBaseline
AlignSpaceBetween
AlignSpaceAround
-
nYGNodeStyleGetAlignContent
public static int nYGNodeStyleGetAlignContent(long node)
-
YGNodeStyleGetAlignContent
public static int YGNodeStyleGetAlignContent(long node)
-
nYGNodeStyleSetAlignItems
public static void nYGNodeStyleSetAlignItems(long node, int alignItems)
Unsafe version of:NodeStyleSetAlignItems
-
YGNodeStyleSetAlignItems
public static void YGNodeStyleSetAlignItems(long node, int alignItems)
- Parameters:
alignItems
- one of:AlignAuto
AlignFlexStart
AlignCenter
AlignFlexEnd
AlignStretch
AlignBaseline
AlignSpaceBetween
AlignSpaceAround
-
nYGNodeStyleGetAlignItems
public static int nYGNodeStyleGetAlignItems(long node)
-
YGNodeStyleGetAlignItems
public static int YGNodeStyleGetAlignItems(long node)
-
nYGNodeStyleSetAlignSelf
public static void nYGNodeStyleSetAlignSelf(long node, int alignSelf)
Unsafe version of:NodeStyleSetAlignSelf
-
YGNodeStyleSetAlignSelf
public static void YGNodeStyleSetAlignSelf(long node, int alignSelf)
- Parameters:
alignSelf
- one of:AlignAuto
AlignFlexStart
AlignCenter
AlignFlexEnd
AlignStretch
AlignBaseline
AlignSpaceBetween
AlignSpaceAround
-
nYGNodeStyleGetAlignSelf
public static int nYGNodeStyleGetAlignSelf(long node)
-
YGNodeStyleGetAlignSelf
public static int YGNodeStyleGetAlignSelf(long node)
-
nYGNodeStyleSetPositionType
public static void nYGNodeStyleSetPositionType(long node, int positionType)
Unsafe version of:NodeStyleSetPositionType
-
YGNodeStyleSetPositionType
public static void YGNodeStyleSetPositionType(long node, int positionType)
- Parameters:
positionType
- one of:PositionTypeRelative
PositionTypeAbsolute
-
nYGNodeStyleGetPositionType
public static int nYGNodeStyleGetPositionType(long node)
-
YGNodeStyleGetPositionType
public static int YGNodeStyleGetPositionType(long node)
-
nYGNodeStyleSetFlexWrap
public static void nYGNodeStyleSetFlexWrap(long node, int flexWrap)
Unsafe version of:NodeStyleSetFlexWrap
-
YGNodeStyleSetFlexWrap
public static void YGNodeStyleSetFlexWrap(long node, int flexWrap)
- Parameters:
flexWrap
- one of:WrapNoWrap
WrapWrap
WrapReverse
-
nYGNodeStyleGetFlexWrap
public static int nYGNodeStyleGetFlexWrap(long node)
-
YGNodeStyleGetFlexWrap
public static int YGNodeStyleGetFlexWrap(long node)
-
nYGNodeStyleSetOverflow
public static void nYGNodeStyleSetOverflow(long node, int overflow)
Unsafe version of:NodeStyleSetOverflow
-
YGNodeStyleSetOverflow
public static void YGNodeStyleSetOverflow(long node, int overflow)
- Parameters:
overflow
- one of:OverflowVisible
OverflowHidden
OverflowScroll
-
nYGNodeStyleGetOverflow
public static int nYGNodeStyleGetOverflow(long node)
-
YGNodeStyleGetOverflow
public static int YGNodeStyleGetOverflow(long node)
-
nYGNodeStyleSetDisplay
public static void nYGNodeStyleSetDisplay(long node, int display)
Unsafe version of:NodeStyleSetDisplay
-
YGNodeStyleSetDisplay
public static void YGNodeStyleSetDisplay(long node, int display)
- Parameters:
display
- one of:DisplayFlex
DisplayNone
-
nYGNodeStyleGetDisplay
public static int nYGNodeStyleGetDisplay(long node)
-
YGNodeStyleGetDisplay
public static int YGNodeStyleGetDisplay(long node)
-
nYGNodeStyleSetFlex
public static void nYGNodeStyleSetFlex(long node, float flex)
-
YGNodeStyleSetFlex
public static void YGNodeStyleSetFlex(long node, float flex)
-
nYGNodeStyleGetFlex
public static float nYGNodeStyleGetFlex(long node)
-
YGNodeStyleGetFlex
public static float YGNodeStyleGetFlex(long node)
-
nYGNodeStyleSetFlexGrow
public static void nYGNodeStyleSetFlexGrow(long node, float flexGrow)
-
YGNodeStyleSetFlexGrow
public static void YGNodeStyleSetFlexGrow(long node, float flexGrow)
-
nYGNodeStyleGetFlexGrow
public static float nYGNodeStyleGetFlexGrow(long node)
-
YGNodeStyleGetFlexGrow
public static float YGNodeStyleGetFlexGrow(long node)
-
nYGNodeStyleSetFlexShrink
public static void nYGNodeStyleSetFlexShrink(long node, float flexShrink)
-
YGNodeStyleSetFlexShrink
public static void YGNodeStyleSetFlexShrink(long node, float flexShrink)
-
nYGNodeStyleGetFlexShrink
public static float nYGNodeStyleGetFlexShrink(long node)
-
YGNodeStyleGetFlexShrink
public static float YGNodeStyleGetFlexShrink(long node)
-
nYGNodeStyleSetFlexBasis
public static void nYGNodeStyleSetFlexBasis(long node, float flexBasis)
-
YGNodeStyleSetFlexBasis
public static void YGNodeStyleSetFlexBasis(long node, float flexBasis)
-
nYGNodeStyleSetFlexBasisPercent
public static void nYGNodeStyleSetFlexBasisPercent(long node, float flexBasis)
-
YGNodeStyleSetFlexBasisPercent
public static void YGNodeStyleSetFlexBasisPercent(long node, float flexBasis)
-
nYGNodeStyleSetFlexBasisAuto
public static void nYGNodeStyleSetFlexBasisAuto(long node)
-
YGNodeStyleSetFlexBasisAuto
public static void YGNodeStyleSetFlexBasisAuto(long node)
-
nYGNodeStyleGetFlexBasis
public static void nYGNodeStyleGetFlexBasis(long node, long __result)
-
nYGNodeStyleSetPosition
public static void nYGNodeStyleSetPosition(long node, int edge, float position)
Unsafe version of:NodeStyleSetPosition
-
YGNodeStyleSetPosition
public static void YGNodeStyleSetPosition(long node, int edge, float position)
- Parameters:
edge
- one of:EdgeLeft
EdgeTop
EdgeRight
EdgeBottom
EdgeStart
EdgeEnd
EdgeHorizontal
EdgeVertical
EdgeAll
-
nYGNodeStyleSetPositionPercent
public static void nYGNodeStyleSetPositionPercent(long node, int edge, float position)
Unsafe version of:NodeStyleSetPositionPercent
-
YGNodeStyleSetPositionPercent
public static void YGNodeStyleSetPositionPercent(long node, int edge, float position)
- Parameters:
edge
- one of:EdgeLeft
EdgeTop
EdgeRight
EdgeBottom
EdgeStart
EdgeEnd
EdgeHorizontal
EdgeVertical
EdgeAll
-
nYGNodeStyleGetPosition
public static void nYGNodeStyleGetPosition(long node, int edge, long __result)
Unsafe version of:NodeStyleGetPosition
-
YGNodeStyleGetPosition
public static YGValue YGNodeStyleGetPosition(long node, int edge, YGValue __result)
- Parameters:
edge
- one of:EdgeLeft
EdgeTop
EdgeRight
EdgeBottom
EdgeStart
EdgeEnd
EdgeHorizontal
EdgeVertical
EdgeAll
-
nYGNodeStyleSetMargin
public static void nYGNodeStyleSetMargin(long node, int edge, float margin)
Unsafe version of:NodeStyleSetMargin
-
YGNodeStyleSetMargin
public static void YGNodeStyleSetMargin(long node, int edge, float margin)
- Parameters:
edge
- one of:EdgeLeft
EdgeTop
EdgeRight
EdgeBottom
EdgeStart
EdgeEnd
EdgeHorizontal
EdgeVertical
EdgeAll
-
nYGNodeStyleSetMarginPercent
public static void nYGNodeStyleSetMarginPercent(long node, int edge, float margin)
Unsafe version of:NodeStyleSetMarginPercent
-
YGNodeStyleSetMarginPercent
public static void YGNodeStyleSetMarginPercent(long node, int edge, float margin)
- Parameters:
edge
- one of:EdgeLeft
EdgeTop
EdgeRight
EdgeBottom
EdgeStart
EdgeEnd
EdgeHorizontal
EdgeVertical
EdgeAll
-
nYGNodeStyleSetMarginAuto
public static void nYGNodeStyleSetMarginAuto(long node, int edge)
Unsafe version of:NodeStyleSetMarginAuto
-
YGNodeStyleSetMarginAuto
public static void YGNodeStyleSetMarginAuto(long node, int edge)
- Parameters:
edge
- one of:EdgeLeft
EdgeTop
EdgeRight
EdgeBottom
EdgeStart
EdgeEnd
EdgeHorizontal
EdgeVertical
EdgeAll
-
nYGNodeStyleGetMargin
public static void nYGNodeStyleGetMargin(long node, int edge, long __result)
Unsafe version of:NodeStyleGetMargin
-
YGNodeStyleGetMargin
public static YGValue YGNodeStyleGetMargin(long node, int edge, YGValue __result)
- Parameters:
edge
- one of:EdgeLeft
EdgeTop
EdgeRight
EdgeBottom
EdgeStart
EdgeEnd
EdgeHorizontal
EdgeVertical
EdgeAll
-
nYGNodeStyleSetPadding
public static void nYGNodeStyleSetPadding(long node, int edge, float padding)
Unsafe version of:NodeStyleSetPadding
-
YGNodeStyleSetPadding
public static void YGNodeStyleSetPadding(long node, int edge, float padding)
- Parameters:
edge
- one of:EdgeLeft
EdgeTop
EdgeRight
EdgeBottom
EdgeStart
EdgeEnd
EdgeHorizontal
EdgeVertical
EdgeAll
-
nYGNodeStyleSetPaddingPercent
public static void nYGNodeStyleSetPaddingPercent(long node, int edge, float padding)
Unsafe version of:NodeStyleSetPaddingPercent
-
YGNodeStyleSetPaddingPercent
public static void YGNodeStyleSetPaddingPercent(long node, int edge, float padding)
- Parameters:
edge
- one of:EdgeLeft
EdgeTop
EdgeRight
EdgeBottom
EdgeStart
EdgeEnd
EdgeHorizontal
EdgeVertical
EdgeAll
-
nYGNodeStyleGetPadding
public static void nYGNodeStyleGetPadding(long node, int edge, long __result)
Unsafe version of:NodeStyleGetPadding
-
YGNodeStyleGetPadding
public static YGValue YGNodeStyleGetPadding(long node, int edge, YGValue __result)
- Parameters:
edge
- one of:EdgeLeft
EdgeTop
EdgeRight
EdgeBottom
EdgeStart
EdgeEnd
EdgeHorizontal
EdgeVertical
EdgeAll
-
nYGNodeStyleSetBorder
public static void nYGNodeStyleSetBorder(long node, int edge, float border)
Unsafe version of:NodeStyleSetBorder
-
YGNodeStyleSetBorder
public static void YGNodeStyleSetBorder(long node, int edge, float border)
- Parameters:
edge
- one of:EdgeLeft
EdgeTop
EdgeRight
EdgeBottom
EdgeStart
EdgeEnd
EdgeHorizontal
EdgeVertical
EdgeAll
-
nYGNodeStyleGetBorder
public static float nYGNodeStyleGetBorder(long node, int edge)
Unsafe version of:NodeStyleGetBorder
-
YGNodeStyleGetBorder
public static float YGNodeStyleGetBorder(long node, int edge)
- Parameters:
edge
- one of:EdgeLeft
EdgeTop
EdgeRight
EdgeBottom
EdgeStart
EdgeEnd
EdgeHorizontal
EdgeVertical
EdgeAll
-
nYGNodeStyleSetWidth
public static void nYGNodeStyleSetWidth(long node, float width)
-
YGNodeStyleSetWidth
public static void YGNodeStyleSetWidth(long node, float width)
-
nYGNodeStyleSetWidthPercent
public static void nYGNodeStyleSetWidthPercent(long node, float width)
-
YGNodeStyleSetWidthPercent
public static void YGNodeStyleSetWidthPercent(long node, float width)
-
nYGNodeStyleSetWidthAuto
public static void nYGNodeStyleSetWidthAuto(long node)
-
YGNodeStyleSetWidthAuto
public static void YGNodeStyleSetWidthAuto(long node)
-
nYGNodeStyleGetWidth
public static void nYGNodeStyleGetWidth(long node, long __result)
-
nYGNodeStyleSetHeight
public static void nYGNodeStyleSetHeight(long node, float height)
-
YGNodeStyleSetHeight
public static void YGNodeStyleSetHeight(long node, float height)
-
nYGNodeStyleSetHeightPercent
public static void nYGNodeStyleSetHeightPercent(long node, float height)
-
YGNodeStyleSetHeightPercent
public static void YGNodeStyleSetHeightPercent(long node, float height)
-
nYGNodeStyleSetHeightAuto
public static void nYGNodeStyleSetHeightAuto(long node)
-
YGNodeStyleSetHeightAuto
public static void YGNodeStyleSetHeightAuto(long node)
-
nYGNodeStyleGetHeight
public static void nYGNodeStyleGetHeight(long node, long __result)
-
nYGNodeStyleSetMinWidth
public static void nYGNodeStyleSetMinWidth(long node, float minWidth)
-
YGNodeStyleSetMinWidth
public static void YGNodeStyleSetMinWidth(long node, float minWidth)
-
nYGNodeStyleSetMinWidthPercent
public static void nYGNodeStyleSetMinWidthPercent(long node, float minWidth)
-
YGNodeStyleSetMinWidthPercent
public static void YGNodeStyleSetMinWidthPercent(long node, float minWidth)
-
nYGNodeStyleGetMinWidth
public static void nYGNodeStyleGetMinWidth(long node, long __result)
-
nYGNodeStyleSetMinHeight
public static void nYGNodeStyleSetMinHeight(long node, float minHeight)
-
YGNodeStyleSetMinHeight
public static void YGNodeStyleSetMinHeight(long node, float minHeight)
-
nYGNodeStyleSetMinHeightPercent
public static void nYGNodeStyleSetMinHeightPercent(long node, float minHeight)
-
YGNodeStyleSetMinHeightPercent
public static void YGNodeStyleSetMinHeightPercent(long node, float minHeight)
-
nYGNodeStyleGetMinHeight
public static void nYGNodeStyleGetMinHeight(long node, long __result)
-
nYGNodeStyleSetMaxWidth
public static void nYGNodeStyleSetMaxWidth(long node, float maxWidth)
-
YGNodeStyleSetMaxWidth
public static void YGNodeStyleSetMaxWidth(long node, float maxWidth)
-
nYGNodeStyleSetMaxWidthPercent
public static void nYGNodeStyleSetMaxWidthPercent(long node, float maxWidth)
-
YGNodeStyleSetMaxWidthPercent
public static void YGNodeStyleSetMaxWidthPercent(long node, float maxWidth)
-
nYGNodeStyleGetMaxWidth
public static void nYGNodeStyleGetMaxWidth(long node, long __result)
-
nYGNodeStyleSetMaxHeight
public static void nYGNodeStyleSetMaxHeight(long node, float maxHeight)
-
YGNodeStyleSetMaxHeight
public static void YGNodeStyleSetMaxHeight(long node, float maxHeight)
-
nYGNodeStyleSetMaxHeightPercent
public static void nYGNodeStyleSetMaxHeightPercent(long node, float maxHeight)
-
YGNodeStyleSetMaxHeightPercent
public static void YGNodeStyleSetMaxHeightPercent(long node, float maxHeight)
-
nYGNodeStyleGetMaxHeight
public static void nYGNodeStyleGetMaxHeight(long node, long __result)
-
nYGNodeStyleSetAspectRatio
public static void nYGNodeStyleSetAspectRatio(long node, float aspectRatio)
Unsafe version of:NodeStyleSetAspectRatio
-
YGNodeStyleSetAspectRatio
public static void YGNodeStyleSetAspectRatio(long node, float aspectRatio)
Aspect ratio controls the size of the undefined dimension of a node.Aspect ratio is encoded as a floating point value width/height. e.g. A value of 2 leads to a node with a width twice the size of its height while a value of 0.5 gives the opposite effect.
- On a node with a set width/height aspect ratio controls the size of the unset dimension
- On a node with a set flex basis aspect ratio controls the size of the node in the cross axis if unset
- On a node with a measure function aspect ratio works as though the measure function measures the flex basis
- On a node with flex grow/shrink aspect ratio controls the size of the node in the cross axis if unset
- Aspect ratio takes min/max dimensions into account
-
nYGNodeStyleGetAspectRatio
public static float nYGNodeStyleGetAspectRatio(long node)
-
YGNodeStyleGetAspectRatio
public static float YGNodeStyleGetAspectRatio(long node)
-
nYGNodeLayoutGetLeft
public static float nYGNodeLayoutGetLeft(long node)
-
YGNodeLayoutGetLeft
public static float YGNodeLayoutGetLeft(long node)
-
nYGNodeLayoutGetTop
public static float nYGNodeLayoutGetTop(long node)
-
YGNodeLayoutGetTop
public static float YGNodeLayoutGetTop(long node)
-
nYGNodeLayoutGetRight
public static float nYGNodeLayoutGetRight(long node)
-
YGNodeLayoutGetRight
public static float YGNodeLayoutGetRight(long node)
-
nYGNodeLayoutGetBottom
public static float nYGNodeLayoutGetBottom(long node)
-
YGNodeLayoutGetBottom
public static float YGNodeLayoutGetBottom(long node)
-
nYGNodeLayoutGetWidth
public static float nYGNodeLayoutGetWidth(long node)
-
YGNodeLayoutGetWidth
public static float YGNodeLayoutGetWidth(long node)
-
nYGNodeLayoutGetHeight
public static float nYGNodeLayoutGetHeight(long node)
-
YGNodeLayoutGetHeight
public static float YGNodeLayoutGetHeight(long node)
-
nYGNodeLayoutGetDirection
public static int nYGNodeLayoutGetDirection(long node)
-
YGNodeLayoutGetDirection
public static int YGNodeLayoutGetDirection(long node)
-
nYGNodeLayoutGetHadOverflow
public static boolean nYGNodeLayoutGetHadOverflow(long node)
-
YGNodeLayoutGetHadOverflow
public static boolean YGNodeLayoutGetHadOverflow(long node)
-
nYGNodeLayoutGetDidLegacyStretchFlagAffectLayout
public static boolean nYGNodeLayoutGetDidLegacyStretchFlagAffectLayout(long node)
-
YGNodeLayoutGetDidLegacyStretchFlagAffectLayout
public static boolean YGNodeLayoutGetDidLegacyStretchFlagAffectLayout(long node)
-
nYGNodeLayoutGetMargin
public static float nYGNodeLayoutGetMargin(long node, int edge)
Unsafe version of:NodeLayoutGetMargin
-
YGNodeLayoutGetMargin
public static float YGNodeLayoutGetMargin(long node, int edge)
Gets the computed value for this nodes after performing layout. If they were set using point values then the returned value will be the same asYGNodeStyleGetMargin
. However if they were set using a percentage value then the returned value is the computed value used during layout.- Parameters:
edge
- one of:EdgeLeft
EdgeTop
EdgeRight
EdgeBottom
EdgeStart
EdgeEnd
EdgeHorizontal
EdgeVertical
EdgeAll
-
nYGNodeLayoutGetBorder
public static float nYGNodeLayoutGetBorder(long node, int edge)
Unsafe version of:NodeLayoutGetBorder
-
YGNodeLayoutGetBorder
public static float YGNodeLayoutGetBorder(long node, int edge)
Gets the computed value for this nodes after performing layout. If they were set using point values then the returned value will be the same asYGNodeStyleGetBorder
. However if they were set using a percentage value then the returned value is the computed value used during layout.- Parameters:
edge
- one of:EdgeLeft
EdgeTop
EdgeRight
EdgeBottom
EdgeStart
EdgeEnd
EdgeHorizontal
EdgeVertical
EdgeAll
-
nYGNodeLayoutGetPadding
public static float nYGNodeLayoutGetPadding(long node, int edge)
Unsafe version of:NodeLayoutGetPadding
-
YGNodeLayoutGetPadding
public static float YGNodeLayoutGetPadding(long node, int edge)
Gets the computed value for this nodes after performing layout. If they were set using point values then the returned value will be the same asYGNodeStyleGetPadding
. However if they were set using a percentage value then the returned value is the computed value used during layout.- Parameters:
edge
- one of:EdgeLeft
EdgeTop
EdgeRight
EdgeBottom
EdgeStart
EdgeEnd
EdgeHorizontal
EdgeVertical
EdgeAll
-
nYGConfigSetLogger
public static void nYGConfigSetLogger(long config, long logger)
-
YGConfigSetLogger
public static void YGConfigSetLogger(long config, @Nullable YGLoggerI logger)
-
nYGAssert
public static void nYGAssert(boolean condition, long message)
-
YGAssert
public static void YGAssert(boolean condition, java.nio.ByteBuffer message)
-
YGAssert
public static void YGAssert(boolean condition, java.lang.CharSequence message)
-
nYGAssertWithNode
public static void nYGAssertWithNode(long node, boolean condition, long message)
-
YGAssertWithNode
public static void YGAssertWithNode(long node, boolean condition, java.nio.ByteBuffer message)
-
YGAssertWithNode
public static void YGAssertWithNode(long node, boolean condition, java.lang.CharSequence message)
-
nYGAssertWithConfig
public static void nYGAssertWithConfig(long config, boolean condition, long message)
-
YGAssertWithConfig
public static void YGAssertWithConfig(long config, boolean condition, java.nio.ByteBuffer message)
-
YGAssertWithConfig
public static void YGAssertWithConfig(long config, boolean condition, java.lang.CharSequence message)
-
nYGConfigSetPointScaleFactor
public static void nYGConfigSetPointScaleFactor(long config, float pixelsInPoint)
Unsafe version of:ConfigSetPointScaleFactor
-
YGConfigSetPointScaleFactor
public static void YGConfigSetPointScaleFactor(long config, float pixelsInPoint)
Set this to number of pixels in 1 point to round calculation results. If you want to avoid rounding setPointScaleFactor
to 0.
-
nYGConfigSetShouldDiffLayoutWithoutLegacyStretchBehaviour
public static void nYGConfigSetShouldDiffLayoutWithoutLegacyStretchBehaviour(long config, boolean shouldDiffLayout)
-
YGConfigSetShouldDiffLayoutWithoutLegacyStretchBehaviour
public static void YGConfigSetShouldDiffLayoutWithoutLegacyStretchBehaviour(long config, boolean shouldDiffLayout)
-
nYGConfigSetUseLegacyStretchBehaviour
public static void nYGConfigSetUseLegacyStretchBehaviour(long config, boolean useLegacyStretchBehaviour)
Unsafe version of:ConfigSetUseLegacyStretchBehaviour
-
YGConfigSetUseLegacyStretchBehaviour
public static void YGConfigSetUseLegacyStretchBehaviour(long config, boolean useLegacyStretchBehaviour)
Yoga previously had an error where containers would take the maximum space possible instead of the minimum like they are supposed to. In practice this resulted in implicit behaviour similar to align-self: stretch; Because this was such a long-standing bug we must allow legacy users to switch back to this behaviour.
-
YGConfigNew
public static long YGConfigNew()
-
nYGConfigFree
public static void nYGConfigFree(long config)
-
YGConfigFree
public static void YGConfigFree(long config)
-
nYGConfigCopy
public static void nYGConfigCopy(long dest, long src)
-
YGConfigCopy
public static void YGConfigCopy(long dest, long src)
-
YGConfigGetInstanceCount
public static int YGConfigGetInstanceCount()
-
nYGConfigSetExperimentalFeatureEnabled
public static void nYGConfigSetExperimentalFeatureEnabled(long config, int feature, boolean enabled)
Unsafe version of:ConfigSetExperimentalFeatureEnabled
-
YGConfigSetExperimentalFeatureEnabled
public static void YGConfigSetExperimentalFeatureEnabled(long config, int feature, boolean enabled)
- Parameters:
feature
- must be:ExperimentalFeatureWebFlexBasis
-
nYGConfigIsExperimentalFeatureEnabled
public static boolean nYGConfigIsExperimentalFeatureEnabled(long config, int feature)
Unsafe version of:ConfigIsExperimentalFeatureEnabled
-
YGConfigIsExperimentalFeatureEnabled
public static boolean YGConfigIsExperimentalFeatureEnabled(long config, int feature)
- Parameters:
feature
- must be:ExperimentalFeatureWebFlexBasis
-
nYGConfigSetUseWebDefaults
public static void nYGConfigSetUseWebDefaults(long config, boolean enabled)
Unsafe version of:ConfigSetUseWebDefaults
-
YGConfigSetUseWebDefaults
public static void YGConfigSetUseWebDefaults(long config, boolean enabled)
Using the web defaults is the preferred configuration for new projects. Usage of non web defaults should be considered as legacy.
-
nYGConfigGetUseWebDefaults
public static boolean nYGConfigGetUseWebDefaults(long config)
-
YGConfigGetUseWebDefaults
public static boolean YGConfigGetUseWebDefaults(long config)
-
nYGConfigSetCloneNodeFunc
public static void nYGConfigSetCloneNodeFunc(long config, long callback)
-
YGConfigSetCloneNodeFunc
public static void YGConfigSetCloneNodeFunc(long config, @Nullable YGCloneNodeFuncI callback)
-
YGConfigGetDefault
public static long YGConfigGetDefault()
-
nYGConfigSetContext
public static void nYGConfigSetContext(long config, long context)
-
YGConfigSetContext
public static void YGConfigSetContext(long config, long context)
-
nYGConfigGetContext
public static long nYGConfigGetContext(long config)
-
YGConfigGetContext
public static long YGConfigGetContext(long config)
-
YGRoundValueToPixelGrid
public static float YGRoundValueToPixelGrid(float value, float pointScaleFactor, boolean forceCeil, boolean forceFloor)
-
nYGAlignToString
public static long nYGAlignToString(int value)
Unsafe version of:AlignToString
-
YGAlignToString
public static java.lang.String YGAlignToString(int value)
- Parameters:
value
- one of:AlignAuto
AlignFlexStart
AlignCenter
AlignFlexEnd
AlignStretch
AlignBaseline
AlignSpaceBetween
AlignSpaceAround
-
nYGDimensionToString
public static long nYGDimensionToString(int value)
Unsafe version of:DimensionToString
-
YGDimensionToString
public static java.lang.String YGDimensionToString(int value)
- Parameters:
value
- one of:DimensionWidth
DimensionHeight
-
nYGDirectionToString
public static long nYGDirectionToString(int value)
Unsafe version of:DirectionToString
-
YGDirectionToString
public static java.lang.String YGDirectionToString(int value)
- Parameters:
value
- one of:DirectionInherit
DirectionLTR
DirectionRTL
-
nYGDisplayToString
public static long nYGDisplayToString(int value)
Unsafe version of:DisplayToString
-
YGDisplayToString
public static java.lang.String YGDisplayToString(int value)
- Parameters:
value
- one of:DisplayFlex
DisplayNone
-
nYGEdgeToString
public static long nYGEdgeToString(int value)
Unsafe version of:EdgeToString
-
YGEdgeToString
public static java.lang.String YGEdgeToString(int value)
- Parameters:
value
- one of:EdgeLeft
EdgeTop
EdgeRight
EdgeBottom
EdgeStart
EdgeEnd
EdgeHorizontal
EdgeVertical
EdgeAll
-
nYGExperimentalFeatureToString
public static long nYGExperimentalFeatureToString(int value)
Unsafe version of:ExperimentalFeatureToString
-
YGExperimentalFeatureToString
public static java.lang.String YGExperimentalFeatureToString(int value)
- Parameters:
value
- must be:ExperimentalFeatureWebFlexBasis
-
nYGFlexDirectionToString
public static long nYGFlexDirectionToString(int value)
Unsafe version of:FlexDirectionToString
-
YGFlexDirectionToString
public static java.lang.String YGFlexDirectionToString(int value)
- Parameters:
value
- one of:FlexDirectionColumn
FlexDirectionColumnReverse
FlexDirectionRow
FlexDirectionRowReverse
-
nYGJustifyToString
public static long nYGJustifyToString(int value)
Unsafe version of:JustifyToString
-
YGJustifyToString
public static java.lang.String YGJustifyToString(int value)
- Parameters:
value
- one of:JustifyFlexStart
JustifyCenter
JustifyFlexEnd
JustifySpaceBetween
JustifySpaceAround
JustifySpaceEvenly
-
nYGLogLevelToString
public static long nYGLogLevelToString(int value)
Unsafe version of:LogLevelToString
-
YGLogLevelToString
public static java.lang.String YGLogLevelToString(int value)
- Parameters:
value
- one of:LogLevelError
LogLevelWarn
LogLevelInfo
LogLevelDebug
LogLevelVerbose
LogLevelFatal
-
nYGMeasureModeToString
public static long nYGMeasureModeToString(int value)
Unsafe version of:MeasureModeToString
-
YGMeasureModeToString
public static java.lang.String YGMeasureModeToString(int value)
- Parameters:
value
- one of:MeasureModeUndefined
MeasureModeExactly
MeasureModeAtMost
-
nYGNodeTypeToString
public static long nYGNodeTypeToString(int value)
Unsafe version of:NodeTypeToString
-
YGNodeTypeToString
public static java.lang.String YGNodeTypeToString(int value)
- Parameters:
value
- one of:NodeTypeDefault
NodeTypeText
-
nYGOverflowToString
public static long nYGOverflowToString(int value)
Unsafe version of:OverflowToString
-
YGOverflowToString
public static java.lang.String YGOverflowToString(int value)
- Parameters:
value
- one of:OverflowVisible
OverflowHidden
OverflowScroll
-
nYGPositionTypeToString
public static long nYGPositionTypeToString(int value)
Unsafe version of:PositionTypeToString
-
YGPositionTypeToString
public static java.lang.String YGPositionTypeToString(int value)
- Parameters:
value
- one of:PositionTypeRelative
PositionTypeAbsolute
-
nYGUnitToString
public static long nYGUnitToString(int value)
Unsafe version of:UnitToString
-
YGUnitToString
public static java.lang.String YGUnitToString(int value)
- Parameters:
value
- one of:UnitUndefined
UnitPoint
UnitPercent
UnitAuto
-
nYGWrapToString
public static long nYGWrapToString(int value)
Unsafe version of:WrapToString
-
YGWrapToString
public static java.lang.String YGWrapToString(int value)
- Parameters:
value
- one of:WrapNoWrap
WrapWrap
WrapReverse
-
-