Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright LWJGL. All rights reserved.
* License terms: https://www.lwjgl.org/license
* MACHINE GENERATED FILE, DO NOT EDIT
*/
package org.lwjgl.util.yoga;
import org.jspecify.annotations.*;
import org.lwjgl.*;
import org.lwjgl.system.*;
import static org.lwjgl.system.Checks.*;
import static org.lwjgl.system.MemoryUtil.*;
/**
* Native bindings to Yoga.
*
*
Yoga is an embeddable layout system used in popular UI frameworks like React Native. Yoga itself is not a UI framework, and does not do any drawing
* itself. Yoga's only responsibility is determining the size and position of boxes.
*
*
Yoga supports a familiar subset of CSS, mostly focused on Flexbox. This gives users a familiar model, and enables sharing code between native platforms
* and the browser.
*
*
Yoga is written in C++, with a public C API. This allows Yoga to be used by a wide variety of languages, via both offficial and unofficial bindings.
*/
public class Yoga {
static { LibYoga.initialize(); }
/**
* YGAlign
*
*
*/
public static final int
YGPositionTypeStatic = 0,
YGPositionTypeRelative = 1,
YGPositionTypeAbsolute = 2;
/**
* YGUnit
*
*
Enum values:
*
*
*
{@link #YGUnitUndefined UnitUndefined}
*
{@link #YGUnitPoint UnitPoint}
*
{@link #YGUnitPercent UnitPercent}
*
{@link #YGUnitAuto UnitAuto}
*
*/
public static final int
YGUnitUndefined = 0,
YGUnitPoint = 1,
YGUnitPercent = 2,
YGUnitAuto = 3;
/**
* YGWrap
*
*
Enum values:
*
*
*
{@link #YGWrapNoWrap WrapNoWrap}
*
{@link #YGWrapWrap WrapWrap}
*
{@link #YGWrapReverse WrapReverse}
*
*/
public static final int
YGWrapNoWrap = 0,
YGWrapWrap = 1,
YGWrapReverse = 2;
public static final float YGUndefined = Float.NaN;
protected Yoga() {
throw new UnsupportedOperationException();
}
// --- [ YGConfigNew ] ---
/**
* Allocates a set of configuration options.
*
*
The configuration may be applied to multiple nodes (i.e. a single global config), or can be applied more granularly per-node.
*/
@NativeType("YGConfigRef")
public static native long YGConfigNew();
// --- [ YGConfigFree ] ---
/** Unsafe version of: {@link #YGConfigFree ConfigFree} */
public static native void nYGConfigFree(long config);
/** Frees the associated Yoga configuration. */
public static void YGConfigFree(@NativeType("YGConfigRef") long config) {
if (CHECKS) {
check(config);
}
nYGConfigFree(config);
}
// --- [ YGConfigGetDefault ] ---
/** Returns the default config values set by Yoga. */
@NativeType("YGConfigConstRef")
public static native long YGConfigGetDefault();
// --- [ YGConfigSetUseWebDefaults ] ---
/** Unsafe version of: {@link #YGConfigSetUseWebDefaults ConfigSetUseWebDefaults} */
public static native void nYGConfigSetUseWebDefaults(long config, boolean enabled);
/**
* Yoga by default creates new nodes with style defaults different from flexbox on web (e.g. {@link #YGFlexDirectionColumn FlexDirectionColumn} and {@link #YGPositionTypeRelative PositionTypeRelative}).
*
*
{@code UseWebDefaults} instructs Yoga to instead use a default style consistent with the web.
*/
public static void YGConfigSetUseWebDefaults(@NativeType("YGConfigRef") long config, @NativeType("bool") boolean enabled) {
if (CHECKS) {
check(config);
}
nYGConfigSetUseWebDefaults(config, enabled);
}
// --- [ YGConfigGetUseWebDefaults ] ---
/** Unsafe version of: {@link #YGConfigGetUseWebDefaults ConfigGetUseWebDefaults} */
public static native boolean nYGConfigGetUseWebDefaults(long config);
/** Whether the configuration is set to use web defaults. */
@NativeType("bool")
public static boolean YGConfigGetUseWebDefaults(@NativeType("YGConfigConstRef") long config) {
if (CHECKS) {
check(config);
}
return nYGConfigGetUseWebDefaults(config);
}
// --- [ YGConfigSetPointScaleFactor ] ---
/** Unsafe version of: {@link #YGConfigSetPointScaleFactor ConfigSetPointScaleFactor} */
public static native void nYGConfigSetPointScaleFactor(long config, float pixelsInPoint);
/**
* Yoga will by default round final layout positions and dimensions to the nearst point.
*
*
{@code pointScaleFactor} controls the density of the grid used for layout rounding (e.g. to round to the closest display pixel).
*
*
May be set to 0.0f to avoid rounding the layout results.
*/
public static void YGConfigSetPointScaleFactor(@NativeType("YGConfigRef") long config, float pixelsInPoint) {
if (CHECKS) {
check(config);
}
nYGConfigSetPointScaleFactor(config, pixelsInPoint);
}
// --- [ YGConfigGetPointScaleFactor ] ---
/** Unsafe version of: {@link #YGConfigGetPointScaleFactor ConfigGetPointScaleFactor} */
public static native float nYGConfigGetPointScaleFactor(long config);
/** Get the currently set point scale factor. */
public static float YGConfigGetPointScaleFactor(@NativeType("YGConfigConstRef") long config) {
if (CHECKS) {
check(config);
}
return nYGConfigGetPointScaleFactor(config);
}
// --- [ YGConfigSetErrata ] ---
/** Unsafe version of: {@link #YGConfigSetErrata ConfigSetErrata} */
public static native void nYGConfigSetErrata(long config, int errata);
/**
* Configures how Yoga balances W3C conformance vs compatibility with layouts created against earlier versions of Yoga.
*
*
By default Yoga will prioritize W3C conformance. {@code Errata} may be set to ask Yoga to produce specific incorrect behaviors. E.g.
* {@code YGConfigSetErrata(config, YGErrataStretchFlexBasis)}.
*
*
{@code YGErrata} is a bitmask, and multiple errata may be set at once. Predefined constants exist for convenience:
*
*
*
{@link #YGErrataNone ErrataNone}: No errata
*
{@link #YGErrataClassic ErrataClassic}: Match layout behaviors of Yoga 1.x
*
{@link #YGErrataAll ErrataAll}: Match layout behaviors of Yoga 1.x, including {@code UseLegacyStretchBehaviour}
*
*/
public static void YGConfigSetErrata(@NativeType("YGConfigRef") long config, @NativeType("YGErrata") int errata) {
if (CHECKS) {
check(config);
}
nYGConfigSetErrata(config, errata);
}
// --- [ YGConfigGetErrata ] ---
/** Unsafe version of: {@link #YGConfigGetErrata ConfigGetErrata} */
public static native int nYGConfigGetErrata(long config);
/** Get the currently set errata. */
@NativeType("YGErrata")
public static int YGConfigGetErrata(@NativeType("YGConfigConstRef") long config) {
if (CHECKS) {
check(config);
}
return nYGConfigGetErrata(config);
}
// --- [ YGConfigSetLogger ] ---
/** Unsafe version of: {@link #YGConfigSetLogger ConfigSetLogger} */
public static native void nYGConfigSetLogger(long config, long logger);
/** Set a custom log function for to use when logging diagnostics or fatal errors. */
public static void YGConfigSetLogger(@NativeType("YGConfigRef") long config, @NativeType("YGLogger") @Nullable YGLoggerI logger) {
if (CHECKS) {
check(config);
}
nYGConfigSetLogger(config, memAddressSafe(logger));
}
// --- [ YGConfigSetContext ] ---
/** Unsafe version of: {@link #YGConfigSetContext ConfigSetContext} */
public static native void nYGConfigSetContext(long config, long context);
/** Sets an arbitrary context pointer on the config which may be read from during callbacks. */
public static void YGConfigSetContext(@NativeType("YGConfigRef") long config, @NativeType("void *") long context) {
if (CHECKS) {
check(config);
}
nYGConfigSetContext(config, context);
}
// --- [ YGConfigGetContext ] ---
/** Unsafe version of: {@link #YGConfigGetContext ConfigGetContext} */
public static native long nYGConfigGetContext(long config);
/** Gets the currently set context. */
@NativeType("void *")
public static long YGConfigGetContext(@NativeType("YGConfigConstRef") long config) {
if (CHECKS) {
check(config);
}
return nYGConfigGetContext(config);
}
// --- [ YGConfigSetExperimentalFeatureEnabled ] ---
/** Unsafe version of: {@link #YGConfigSetExperimentalFeatureEnabled ConfigSetExperimentalFeatureEnabled} */
public static native void nYGConfigSetExperimentalFeatureEnabled(long config, int feature, boolean enabled);
/**
* Enable an experimental/unsupported feature in Yoga.
*
* @param feature must be:
*/
@NativeType("bool")
public static boolean YGConfigIsExperimentalFeatureEnabled(@NativeType("YGConfigConstRef") long config, @NativeType("YGExperimentalFeature") int feature) {
if (CHECKS) {
check(config);
}
return nYGConfigIsExperimentalFeatureEnabled(config, feature);
}
// --- [ YGConfigSetCloneNodeFunc ] ---
/** Unsafe version of: {@link #YGConfigSetCloneNodeFunc ConfigSetCloneNodeFunc} */
public static native void nYGConfigSetCloneNodeFunc(long config, long callback);
/**
* Sets a callback, called during layout, to create a new mutable Yoga node if Yoga must write to it and its owner is not its parent observed during
* layout.
*/
public static void YGConfigSetCloneNodeFunc(@NativeType("YGConfigRef") long config, @NativeType("YGCloneNodeFunc") @Nullable YGCloneNodeFuncI callback) {
if (CHECKS) {
check(config);
}
nYGConfigSetCloneNodeFunc(config, memAddressSafe(callback));
}
// --- [ YGNodeNew ] ---
/** Heap allocates and returns a new Yoga node using Yoga settings. */
@NativeType("YGNodeRef")
public static native long YGNodeNew();
// --- [ YGNodeNewWithConfig ] ---
/** Unsafe version of: {@link #YGNodeNewWithConfig NodeNewWithConfig} */
public static native long nYGNodeNewWithConfig(long config);
/** Heap allocates and returns a new Yoga node, with customized settings. */
@NativeType("YGNodeRef")
public static long YGNodeNewWithConfig(@NativeType("YGConfigConstRef") long config) {
if (CHECKS) {
check(config);
}
return nYGNodeNewWithConfig(config);
}
// --- [ YGNodeClone ] ---
/** Unsafe version of: {@link #YGNodeClone NodeClone} */
public static native long nYGNodeClone(long node);
/**
* Returns a mutable copy of an existing node, with the same context and children, but no owner set.
*
*
Does not call the function set by {@link #YGConfigSetCloneNodeFunc ConfigSetCloneNodeFunc}.
*/
@NativeType("YGNodeRef")
public static long YGNodeClone(@NativeType("YGNodeConstRef") long node) {
if (CHECKS) {
check(node);
}
return nYGNodeClone(node);
}
// --- [ YGNodeFree ] ---
/** Unsafe version of: {@link #YGNodeFree NodeFree} */
public static native void nYGNodeFree(long node);
/** Frees the Yoga node, disconnecting it from its owner and children. */
public static void YGNodeFree(@NativeType("YGNodeRef") long node) {
if (CHECKS) {
check(node);
}
nYGNodeFree(node);
}
// --- [ YGNodeFreeRecursive ] ---
/** Unsafe version of: {@link #YGNodeFreeRecursive NodeFreeRecursive} */
public static native void nYGNodeFreeRecursive(long node);
/** Frees the subtree of Yoga nodes rooted at the given node. */
public static void YGNodeFreeRecursive(@NativeType("YGNodeRef") long node) {
if (CHECKS) {
check(node);
}
nYGNodeFreeRecursive(node);
}
// --- [ YGNodeFinalize ] ---
/** Unsafe version of: {@link #YGNodeFinalize NodeFinalize} */
public static native void nYGNodeFinalize(long node);
/**
* Frees the Yoga node without disconnecting it from its owner or children.
*
*
Allows garbage collecting Yoga nodes in parallel when the entire tree is unreachable.
*/
public static void YGNodeFinalize(@NativeType("YGNodeRef") long node) {
if (CHECKS) {
check(node);
}
nYGNodeFinalize(node);
}
// --- [ YGNodeReset ] ---
/** Unsafe version of: {@link #YGNodeReset NodeReset} */
public static native void nYGNodeReset(long node);
/** Resets the node to its default state. */
public static void YGNodeReset(@NativeType("YGNodeRef") long node) {
if (CHECKS) {
check(node);
}
nYGNodeReset(node);
}
// --- [ YGNodeCalculateLayout ] ---
/** Unsafe version of: {@link #YGNodeCalculateLayout NodeCalculateLayout} */
public static native void nYGNodeCalculateLayout(long node, float availableWidth, float availableHeight, int ownerDirection);
/**
* Calculates the layout of the tree rooted at the given node.
*
*
Layout results may be read after calling {@code YGNodeCalculateLayout()} using functions like {@link #YGNodeLayoutGetLeft NodeLayoutGetLeft}, {@link #YGNodeLayoutGetTop NodeLayoutGetTop}, etc.
*
*
{@link #YGNodeGetHasNewLayout NodeGetHasNewLayout} may be read to know if the layout of the node or its subtrees may have changed since the last time {@code YGNodeCalculate()} was
* called.
*
* @param ownerDirection one of:
{@link #YGDirectionInherit DirectionInherit}
{@link #YGDirectionLTR DirectionLTR}
{@link #YGDirectionRTL DirectionRTL}
*/
public static void YGNodeCalculateLayout(@NativeType("YGNodeRef") long node, float availableWidth, float availableHeight, @NativeType("YGDirection") int ownerDirection) {
if (CHECKS) {
check(node);
}
nYGNodeCalculateLayout(node, availableWidth, availableHeight, ownerDirection);
}
// --- [ YGNodeGetHasNewLayout ] ---
/** Unsafe version of: {@link #YGNodeGetHasNewLayout NodeGetHasNewLayout} */
public static native boolean nYGNodeGetHasNewLayout(long node);
/**
* Whether the given node may have new layout results.
*
*
Must be reset by calling {@link #YGNodeSetHasNewLayout NodeSetHasNewLayout}.
*/
@NativeType("bool")
public static boolean YGNodeGetHasNewLayout(@NativeType("YGNodeConstRef") long node) {
if (CHECKS) {
check(node);
}
return nYGNodeGetHasNewLayout(node);
}
// --- [ YGNodeSetHasNewLayout ] ---
/** Unsafe version of: {@link #YGNodeSetHasNewLayout NodeSetHasNewLayout} */
public static native void nYGNodeSetHasNewLayout(long node, boolean hasNewLayout);
/** Sets whether a nodes layout is considered new. */
public static void YGNodeSetHasNewLayout(@NativeType("YGNodeRef") long node, @NativeType("bool") boolean hasNewLayout) {
if (CHECKS) {
check(node);
}
nYGNodeSetHasNewLayout(node, hasNewLayout);
}
// --- [ YGNodeIsDirty ] ---
/** Unsafe version of: {@link #YGNodeIsDirty NodeIsDirty} */
public static native boolean nYGNodeIsDirty(long node);
/** Whether the node's layout results are dirty due to it or its children changing. */
@NativeType("bool")
public static boolean YGNodeIsDirty(@NativeType("YGNodeConstRef") long node) {
if (CHECKS) {
check(node);
}
return nYGNodeIsDirty(node);
}
// --- [ YGNodeMarkDirty ] ---
/** Unsafe version of: {@link #YGNodeMarkDirty NodeMarkDirty} */
public static native void nYGNodeMarkDirty(long node);
/** Marks a node with custom measure function as dirty. */
public static void YGNodeMarkDirty(@NativeType("YGNodeRef") long node) {
if (CHECKS) {
check(node);
}
nYGNodeMarkDirty(node);
}
// --- [ YGNodeSetDirtiedFunc ] ---
/** Unsafe version of: {@link #YGNodeSetDirtiedFunc NodeSetDirtiedFunc} */
public static native void nYGNodeSetDirtiedFunc(long node, long dirtiedFunc);
/** Called when a change is made to the Yoga tree which dirties this node. */
public static void YGNodeSetDirtiedFunc(@NativeType("YGNodeRef") long node, @NativeType("YGDirtiedFunc") @Nullable YGDirtiedFuncI dirtiedFunc) {
if (CHECKS) {
check(node);
}
nYGNodeSetDirtiedFunc(node, memAddressSafe(dirtiedFunc));
}
// --- [ YGNodeGetDirtiedFunc ] ---
/** Unsafe version of: {@link #YGNodeGetDirtiedFunc NodeGetDirtiedFunc} */
public static native long nYGNodeGetDirtiedFunc(long node);
/** Returns a dirtied func if set. */
@NativeType("YGDirtiedFunc")
public static @Nullable YGDirtiedFunc YGNodeGetDirtiedFunc(@NativeType("YGNodeConstRef") long node) {
if (CHECKS) {
check(node);
}
return YGDirtiedFunc.createSafe(nYGNodeGetDirtiedFunc(node));
}
// --- [ YGNodeInsertChild ] ---
/** Unsafe version of: {@link #YGNodeInsertChild NodeInsertChild} */
public static native void nYGNodeInsertChild(long node, long child, long index);
/** Inserts a child node at the given index. */
public static void YGNodeInsertChild(@NativeType("YGNodeRef") long node, @NativeType("YGNodeRef") long child, @NativeType("size_t") long index) {
if (CHECKS) {
check(node);
check(child);
}
nYGNodeInsertChild(node, child, index);
}
// --- [ YGNodeSwapChild ] ---
/** Unsafe version of: {@link #YGNodeSwapChild NodeSwapChild} */
public static native void nYGNodeSwapChild(long node, long child, long index);
/** Replaces the child node at a given index with a new one. */
public static void YGNodeSwapChild(@NativeType("YGNodeRef") long node, @NativeType("YGNodeRef") long child, @NativeType("size_t") long index) {
if (CHECKS) {
check(node);
check(child);
}
nYGNodeSwapChild(node, child, index);
}
// --- [ YGNodeRemoveChild ] ---
/** Unsafe version of: {@link #YGNodeRemoveChild NodeRemoveChild} */
public static native void nYGNodeRemoveChild(long node, long child);
/** Removes the given child node. */
public static void YGNodeRemoveChild(@NativeType("YGNodeRef") long node, @NativeType("YGNodeRef") long child) {
if (CHECKS) {
check(node);
check(child);
}
nYGNodeRemoveChild(node, child);
}
// --- [ YGNodeRemoveAllChildren ] ---
/** Unsafe version of: {@link #YGNodeRemoveAllChildren NodeRemoveAllChildren} */
public static native void nYGNodeRemoveAllChildren(long node);
/** Removes all children nodes. */
public static void YGNodeRemoveAllChildren(@NativeType("YGNodeRef") long node) {
if (CHECKS) {
check(node);
}
nYGNodeRemoveAllChildren(node);
}
// --- [ YGNodeSetChildren ] ---
/** Unsafe version of: {@link #YGNodeSetChildren NodeSetChildren} */
public static native void nYGNodeSetChildren(long owner, long children, long count);
/** Sets children according to the given list of nodes. */
public static void YGNodeSetChildren(@NativeType("YGNodeRef") long owner, @NativeType("YGNodeRef const *") PointerBuffer children) {
if (CHECKS) {
check(owner);
}
nYGNodeSetChildren(owner, memAddress(children), children.remaining());
}
// --- [ YGNodeGetChild ] ---
/** Unsafe version of: {@link #YGNodeGetChild NodeGetChild} */
public static native long nYGNodeGetChild(long node, long index);
/** Get the child node at a given index. */
@NativeType("YGNodeRef")
public static long YGNodeGetChild(@NativeType("YGNodeRef") long node, @NativeType("size_t") long index) {
if (CHECKS) {
check(node);
}
return nYGNodeGetChild(node, index);
}
// --- [ YGNodeGetChildCount ] ---
/** Unsafe version of: {@link #YGNodeGetChildCount NodeGetChildCount} */
public static native long nYGNodeGetChildCount(long node);
/** The number of child nodes. */
@NativeType("size_t")
public static long YGNodeGetChildCount(@NativeType("YGNodeConstRef") long node) {
if (CHECKS) {
check(node);
}
return nYGNodeGetChildCount(node);
}
// --- [ YGNodeGetOwner ] ---
/** Unsafe version of: {@link #YGNodeGetOwner NodeGetOwner} */
public static native long nYGNodeGetOwner(long node);
/** Get the parent/owner currently set for a node. */
@NativeType("YGNodeRef")
public static long YGNodeGetOwner(@NativeType("YGNodeRef") long node) {
if (CHECKS) {
check(node);
}
return nYGNodeGetOwner(node);
}
// --- [ YGNodeGetParent ] ---
/** Unsafe version of: {@link #YGNodeGetParent NodeGetParent} */
public static native long nYGNodeGetParent(long node);
/** Get the parent/owner currently set for a node. */
@NativeType("YGNodeRef")
public static long YGNodeGetParent(@NativeType("YGNodeRef") long node) {
if (CHECKS) {
check(node);
}
return nYGNodeGetParent(node);
}
// --- [ YGNodeSetConfig ] ---
/** Unsafe version of: {@link #YGNodeSetConfig NodeSetConfig} */
public static native void nYGNodeSetConfig(long node, long config);
/** Set a new config for the node after creation. */
public static void YGNodeSetConfig(@NativeType("YGNodeRef") long node, @NativeType("YGConfigRef") long config) {
if (CHECKS) {
check(node);
check(config);
}
nYGNodeSetConfig(node, config);
}
// --- [ YGNodeGetConfig ] ---
/** Unsafe version of: {@link #YGNodeGetConfig NodeGetConfig} */
public static native long nYGNodeGetConfig(long node);
/** Get the config currently set on the node. */
@NativeType("YGConfigRef")
public static long YGNodeGetConfig(@NativeType("YGNodeRef") long node) {
if (CHECKS) {
check(node);
}
return nYGNodeGetConfig(node);
}
// --- [ YGNodeSetContext ] ---
/** Unsafe version of: {@link #YGNodeSetContext NodeSetContext} */
public static native void nYGNodeSetContext(long node, long context);
/** Sets extra data on the Yoga node which may be read from during callbacks. */
public static void YGNodeSetContext(@NativeType("YGNodeRef") long node, @NativeType("void *") long context) {
if (CHECKS) {
check(node);
}
nYGNodeSetContext(node, context);
}
// --- [ YGNodeGetContext ] ---
/** Unsafe version of: {@link #YGNodeGetContext NodeGetContext} */
public static native long nYGNodeGetContext(long node);
/** Returns the context or {@code NULL} if no context has been set. */
@NativeType("void *")
public static long YGNodeGetContext(@NativeType("YGNodeRef") long node) {
if (CHECKS) {
check(node);
}
return nYGNodeGetContext(node);
}
// --- [ YGNodeSetMeasureFunc ] ---
/** Unsafe version of: {@link #YGNodeSetMeasureFunc NodeSetMeasureFunc} */
public static native void nYGNodeSetMeasureFunc(long node, long measureFunc);
/**
* Allows providing custom measurements for a Yoga leaf node (usually for measuring text).
*
*
{@link #YGNodeMarkDirty NodeMarkDirty} must be set if content effecting the measurements of the node changes.
*/
public static void YGNodeSetMeasureFunc(@NativeType("YGNodeRef") long node, @NativeType("YGMeasureFunc") @Nullable YGMeasureFuncI measureFunc) {
if (CHECKS) {
check(node);
}
nYGNodeSetMeasureFunc(node, memAddressSafe(measureFunc));
}
// --- [ YGNodeHasMeasureFunc ] ---
/** Unsafe version of: {@link #YGNodeHasMeasureFunc NodeHasMeasureFunc} */
public static native boolean nYGNodeHasMeasureFunc(long node);
/** Whether a measure function is set. */
@NativeType("bool")
public static boolean YGNodeHasMeasureFunc(@NativeType("YGNodeConstRef") long node) {
if (CHECKS) {
check(node);
}
return nYGNodeHasMeasureFunc(node);
}
// --- [ YGNodeSetBaselineFunc ] ---
/** Unsafe version of: {@link #YGNodeSetBaselineFunc NodeSetBaselineFunc} */
public static native void nYGNodeSetBaselineFunc(long node, long baselineFunc);
/** Set a custom function for determining the text baseline for use in baseline alignment. */
public static void YGNodeSetBaselineFunc(@NativeType("YGNodeRef") long node, @NativeType("YGBaselineFunc") @Nullable YGBaselineFuncI baselineFunc) {
if (CHECKS) {
check(node);
}
nYGNodeSetBaselineFunc(node, memAddressSafe(baselineFunc));
}
// --- [ YGNodeHasBaselineFunc ] ---
/** Unsafe version of: {@link #YGNodeHasBaselineFunc NodeHasBaselineFunc} */
public static native boolean nYGNodeHasBaselineFunc(long node);
/** Whether a baseline function is set. */
@NativeType("bool")
public static boolean YGNodeHasBaselineFunc(@NativeType("YGNodeConstRef") long node) {
if (CHECKS) {
check(node);
}
return nYGNodeHasBaselineFunc(node);
}
// --- [ YGNodeSetIsReferenceBaseline ] ---
/** Unsafe version of: {@link #YGNodeSetIsReferenceBaseline NodeSetIsReferenceBaseline} */
public static native void nYGNodeSetIsReferenceBaseline(long node, boolean isReferenceBaseline);
/** Sets this node should be considered the reference baseline among siblings. */
public static void YGNodeSetIsReferenceBaseline(@NativeType("YGNodeRef") long node, @NativeType("bool") boolean isReferenceBaseline) {
if (CHECKS) {
check(node);
}
nYGNodeSetIsReferenceBaseline(node, isReferenceBaseline);
}
// --- [ YGNodeIsReferenceBaseline ] ---
/** Unsafe version of: {@link #YGNodeIsReferenceBaseline NodeIsReferenceBaseline} */
public static native boolean nYGNodeIsReferenceBaseline(long node);
/** Whether this node is set as the reference baseline. */
@NativeType("bool")
public static boolean YGNodeIsReferenceBaseline(@NativeType("YGNodeConstRef") long node) {
if (CHECKS) {
check(node);
}
return nYGNodeIsReferenceBaseline(node);
}
// --- [ YGNodeSetNodeType ] ---
/** Unsafe version of: {@link #YGNodeSetNodeType NodeSetNodeType} */
public static native void nYGNodeSetNodeType(long node, int nodeType);
/** Sets whether a leaf node's layout results may be truncated during layout rounding. */
public static void YGNodeSetNodeType(@NativeType("YGNodeRef") long node, @NativeType("YGNodeType") int nodeType) {
if (CHECKS) {
check(node);
}
nYGNodeSetNodeType(node, nodeType);
}
// --- [ YGNodeGetNodeType ] ---
/** Unsafe version of: {@link #YGNodeGetNodeType NodeGetNodeType} */
public static native int nYGNodeGetNodeType(long node);
/** Whether a leaf node's layout results may be truncated during layout rounding. */
@NativeType("YGNodeType")
public static int YGNodeGetNodeType(@NativeType("YGNodeConstRef") long node) {
if (CHECKS) {
check(node);
}
return nYGNodeGetNodeType(node);
}
// --- [ YGNodeSetAlwaysFormsContainingBlock ] ---
/** Unsafe version of: {@link #YGNodeSetAlwaysFormsContainingBlock NodeSetAlwaysFormsContainingBlock} */
public static native void nYGNodeSetAlwaysFormsContainingBlock(long node, boolean alwaysFormsContainingBlock);
/**
* Make it so that this node will always form a containing block for any descendant nodes.
*
*
This is useful for when a node has a property outside of Yoga that will form a containing block. For example, transforms or some of the others listed
* in Layout and the containing block.
*/
public static void YGNodeSetAlwaysFormsContainingBlock(@NativeType("YGNodeRef") long node, @NativeType("bool") boolean alwaysFormsContainingBlock) {
if (CHECKS) {
check(node);
}
nYGNodeSetAlwaysFormsContainingBlock(node, alwaysFormsContainingBlock);
}
// --- [ YGNodeGetAlwaysFormsContainingBlock ] ---
/** Unsafe version of: {@link #YGNodeGetAlwaysFormsContainingBlock NodeGetAlwaysFormsContainingBlock} */
public static native boolean nYGNodeGetAlwaysFormsContainingBlock(long node);
/**
* Whether the node will always form a containing block for any descendant.
*
*
This can happen in situation where the client implements something like a transform that can affect containing blocks but is not handled by Yoga
* directly.
*/
@NativeType("bool")
public static boolean YGNodeGetAlwaysFormsContainingBlock(@NativeType("YGNodeConstRef") long node) {
if (CHECKS) {
check(node);
}
return nYGNodeGetAlwaysFormsContainingBlock(node);
}
// --- [ YGNodeLayoutGetLeft ] ---
public static native float nYGNodeLayoutGetLeft(long node);
public static float YGNodeLayoutGetLeft(@NativeType("YGNodeRef") long node) {
if (CHECKS) {
check(node);
}
return nYGNodeLayoutGetLeft(node);
}
// --- [ YGNodeLayoutGetTop ] ---
public static native float nYGNodeLayoutGetTop(long node);
public static float YGNodeLayoutGetTop(@NativeType("YGNodeRef") long node) {
if (CHECKS) {
check(node);
}
return nYGNodeLayoutGetTop(node);
}
// --- [ YGNodeLayoutGetRight ] ---
public static native float nYGNodeLayoutGetRight(long node);
public static float YGNodeLayoutGetRight(@NativeType("YGNodeRef") long node) {
if (CHECKS) {
check(node);
}
return nYGNodeLayoutGetRight(node);
}
// --- [ YGNodeLayoutGetBottom ] ---
public static native float nYGNodeLayoutGetBottom(long node);
public static float YGNodeLayoutGetBottom(@NativeType("YGNodeRef") long node) {
if (CHECKS) {
check(node);
}
return nYGNodeLayoutGetBottom(node);
}
// --- [ YGNodeLayoutGetWidth ] ---
public static native float nYGNodeLayoutGetWidth(long node);
public static float YGNodeLayoutGetWidth(@NativeType("YGNodeRef") long node) {
if (CHECKS) {
check(node);
}
return nYGNodeLayoutGetWidth(node);
}
// --- [ YGNodeLayoutGetHeight ] ---
public static native float nYGNodeLayoutGetHeight(long node);
public static float YGNodeLayoutGetHeight(@NativeType("YGNodeRef") long node) {
if (CHECKS) {
check(node);
}
return nYGNodeLayoutGetHeight(node);
}
// --- [ YGNodeLayoutGetDirection ] ---
public static native int nYGNodeLayoutGetDirection(long node);
@NativeType("YGDirection")
public static int YGNodeLayoutGetDirection(@NativeType("YGNodeRef") long node) {
if (CHECKS) {
check(node);
}
return nYGNodeLayoutGetDirection(node);
}
// --- [ YGNodeLayoutGetHadOverflow ] ---
public static native boolean nYGNodeLayoutGetHadOverflow(long node);
@NativeType("bool")
public static boolean YGNodeLayoutGetHadOverflow(@NativeType("YGNodeRef") long node) {
if (CHECKS) {
check(node);
}
return nYGNodeLayoutGetHadOverflow(node);
}
// --- [ YGNodeLayoutGetMargin ] ---
/** Unsafe version of: {@link #YGNodeLayoutGetMargin NodeLayoutGetMargin} */
public static native float nYGNodeLayoutGetMargin(long node, int edge);
/**
* Gets the computed value for these nodess after performing layout.
*
*
If they were set using point values then the returned value will be the same as {@link #YGNodeStyleGetMargin NodeStyleGetMargin}). However if they were set using a percentage
* value then the returned value is the computed value used during layout.
*
* @param edge one of:
{@link #YGEdgeLeft EdgeLeft}
{@link #YGEdgeTop EdgeTop}
{@link #YGEdgeRight EdgeRight}
{@link #YGEdgeBottom EdgeBottom}
{@link #YGEdgeStart EdgeStart}
{@link #YGEdgeEnd EdgeEnd}
{@link #YGEdgeHorizontal EdgeHorizontal}
{@link #YGEdgeVertical EdgeVertical}
{@link #YGEdgeAll EdgeAll}
*/
public static float YGNodeLayoutGetMargin(@NativeType("YGNodeRef") long node, @NativeType("YGEdge") int edge) {
if (CHECKS) {
check(node);
}
return nYGNodeLayoutGetMargin(node, edge);
}
// --- [ YGNodeLayoutGetBorder ] ---
/** Unsafe version of: {@link #YGNodeLayoutGetBorder NodeLayoutGetBorder} */
public static native float nYGNodeLayoutGetBorder(long node, int edge);
/**
* Gets the computed value for these nodes after performing layout.
*
*
If they were set using point values then the returned value will be the same as {@link #YGNodeStyleGetBorder NodeStyleGetBorder}. However if they were set using a percentage
* value then the returned value is the computed value used during layout.
*
* @param edge one of:
{@link #YGEdgeLeft EdgeLeft}
{@link #YGEdgeTop EdgeTop}
{@link #YGEdgeRight EdgeRight}
{@link #YGEdgeBottom EdgeBottom}
{@link #YGEdgeStart EdgeStart}
{@link #YGEdgeEnd EdgeEnd}
{@link #YGEdgeHorizontal EdgeHorizontal}
{@link #YGEdgeVertical EdgeVertical}
{@link #YGEdgeAll EdgeAll}
*/
public static float YGNodeLayoutGetBorder(@NativeType("YGNodeRef") long node, @NativeType("YGEdge") int edge) {
if (CHECKS) {
check(node);
}
return nYGNodeLayoutGetBorder(node, edge);
}
// --- [ YGNodeLayoutGetPadding ] ---
/** Unsafe version of: {@link #YGNodeLayoutGetPadding NodeLayoutGetPadding} */
public static native float nYGNodeLayoutGetPadding(long node, int edge);
/**
* Gets the computed value for these nodes after performing layout.
*
*
If they were set using point values then the returned value will be the same as {@link #YGNodeStyleGetPadding NodeStyleGetPadding}. However if they were set using a percentage
* value then the returned value is the computed value used during layout.
*
* @param edge one of:
{@link #YGEdgeLeft EdgeLeft}
{@link #YGEdgeTop EdgeTop}
{@link #YGEdgeRight EdgeRight}
{@link #YGEdgeBottom EdgeBottom}
{@link #YGEdgeStart EdgeStart}
{@link #YGEdgeEnd EdgeEnd}
{@link #YGEdgeHorizontal EdgeHorizontal}
{@link #YGEdgeVertical EdgeVertical}
{@link #YGEdgeAll EdgeAll}
*/
public static float YGNodeLayoutGetPadding(@NativeType("YGNodeRef") long node, @NativeType("YGEdge") int edge) {
if (CHECKS) {
check(node);
}
return nYGNodeLayoutGetPadding(node, edge);
}
// --- [ YGNodeCopyStyle ] ---
public static native void nYGNodeCopyStyle(long dstNode, long srcNode);
public static void YGNodeCopyStyle(@NativeType("YGNodeRef") long dstNode, @NativeType("YGNodeConstRef") long srcNode) {
if (CHECKS) {
check(dstNode);
check(srcNode);
}
nYGNodeCopyStyle(dstNode, srcNode);
}
// --- [ YGNodeStyleSetDirection ] ---
/** Unsafe version of: {@link #YGNodeStyleSetDirection NodeStyleSetDirection} */
public static native void nYGNodeStyleSetDirection(long node, int direction);
/** @param direction one of:
{@link #YGDirectionInherit DirectionInherit}
{@link #YGDirectionLTR DirectionLTR}
{@link #YGDirectionRTL DirectionRTL}
*/
public static void YGNodeStyleSetDirection(@NativeType("YGNodeRef") long node, @NativeType("YGDirection") int direction) {
if (CHECKS) {
check(node);
}
nYGNodeStyleSetDirection(node, direction);
}
// --- [ YGNodeStyleGetDirection ] ---
public static native int nYGNodeStyleGetDirection(long node);
@NativeType("YGDirection")
public static int YGNodeStyleGetDirection(@NativeType("YGNodeConstRef") long node) {
if (CHECKS) {
check(node);
}
return nYGNodeStyleGetDirection(node);
}
// --- [ YGNodeStyleSetFlexDirection ] ---
/** Unsafe version of: {@link #YGNodeStyleSetFlexDirection NodeStyleSetFlexDirection} */
public static native void nYGNodeStyleSetFlexDirection(long node, int flexDirection);
/** @param flexDirection one of: