Top Description Inners Fields Constructors Methods
org.lwjgl.util.yoga

public Class YGNode

extends Struct<YGNode>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

Unstable/private API.

Layout


struct YGNode {
    void * context;
    YGNodeFlags flags;
    union {
        YGMeasureFunc noContext;
        MeasureWithContextFn withContext;
    } measure;
    union {
        YGBaselineFunc noContext;
        BaselineWithContextFn withContext;
    } baseline;
    union {
        YGPrintFunc noContext;
        PrintWithContextFn withContext;
    } print;
    YGDirtiedFunc dirtied;
    YGStyle style;
    YGLayout layout;
    uint32_t lineIndex;
    YGNodeRef owner;
    YGVector children;
    YGConfigRef config;
    YGValue resolvedDimensions[2];
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
YGNode.Buffer

An array of YGNode structs.

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
BASELINE

The struct member offsets.

public static final int
BASELINE_NOCONTEXT

The struct member offsets.

public static final int
BASELINE_WITHCONTEXT

The struct member offsets.

public static final int
CHILDREN

The struct member offsets.

public static final int
CONFIG

The struct member offsets.

public static final int
CONTEXT

The struct member offsets.

public static final int
DIRTIED

The struct member offsets.

public static final int
FLAGS

The struct member offsets.

public static final int
LAYOUT

The struct member offsets.

public static final int
LINEINDEX

The struct member offsets.

public static final int
MEASURE

The struct member offsets.

public static final int
MEASURE_NOCONTEXT

The struct member offsets.

public static final int
MEASURE_WITHCONTEXT

The struct member offsets.

public static final int
OWNER

The struct member offsets.

public static final int
PRINT

The struct member offsets.

public static final int
RESOLVEDDIMENSIONS

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

public static final int
STYLE

The struct member offsets.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
YGNode(long address, ByteBuffer container)

public
YGNode(ByteBuffer container)

Creates a YGNode instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
public YGBaselineFunc

Returns:

the value of the baseline.noContext field.
baseline_noContext
()

public YGNode
baseline_noContext(YGBaselineFuncI value)

Sets the specified value to the noContext field.

public long

Returns:

the value of the baseline.withContext field.
baseline_withContext
()

public YGNode
baseline_withContext(long value)

Sets the specified value to the withContext field.

public static YGNode
calloc()

Returns a new YGNode instance allocated with memCalloc.

public static YGNode.Buffer
calloc(int
the buffer capacity
capacity
)

Returns a new YGNode.Buffer instance allocated with memCalloc.

public static YGNode
calloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new YGNode instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static YGNode.Buffer
calloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new YGNode.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static YGNode
callocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static YGNode
callocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static YGNode.Buffer
callocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static YGNode.Buffer
callocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public long

Returns:

the value of the config field.
config
()

public YGNode
config(long value)

Sets the specified value to the config field.

public long

Returns:

the value of the context field.
context
()

public YGNode
context(long value)

Sets the specified value to the context field.

protected YGNode
create(long
the struct memory address
address
,
ByteBuffer
an optional container buffer, to be referenced strongly by the struct instance.
container
)

Implements abstract org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static YGNode
create()

Returns a new YGNode instance allocated with BufferUtils.

public static YGNode
create(long address)

Returns a new YGNode instance for the specified memory address.

public static YGNode.Buffer
create(int
the buffer capacity
capacity
)

Returns a new YGNode.Buffer instance allocated with BufferUtils.

public static YGNode.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a YGNode.Buffer instance at the specified memory.

public static YGNode
createSafe(long address)

Like create, but returns null if address is NULL.

public static YGNode.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public YGDirtiedFunc

Returns:

the value of the dirtied field.
dirtied
()

public YGNode
dirtied(YGDirtiedFuncI value)

Sets the specified value to the dirtied field.

public YGNodeFlags

Returns:

a YGNodeFlags view of the flags field.
flags
()

public YGNode
flags(YGNodeFlags value)

Copies the specified YGNodeFlags to the flags field.

public YGNode
flags(Consumer<YGNodeFlags> consumer)

Passes the flags field to the specified Consumer.

public YGLayout

Returns:

a YGLayout view of the layout field.
layout
()

public YGNode
layout(YGLayout value)

Copies the specified YGLayout to the layout field.

public int

Returns:

the value of the lineIndex field.
lineIndex
()

public YGNode
lineIndex(int value)

Sets the specified value to the lineIndex field.

public static YGNode
malloc()

Returns a new YGNode instance allocated with memAlloc.

public static YGNode.Buffer
malloc(int
the buffer capacity
capacity
)

Returns a new YGNode.Buffer instance allocated with memAlloc.

public static YGNode
malloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new YGNode instance allocated on the specified MemoryStack.

public static YGNode.Buffer
malloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new YGNode.Buffer instance allocated on the specified MemoryStack.

public static YGNode
mallocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static YGNode
mallocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static YGNode.Buffer
mallocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static YGNode.Buffer
mallocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public YGMeasureFunc

Returns:

the value of the measure.noContext field.
measure_noContext
()

public YGNode
measure_noContext(YGMeasureFuncI value)

Sets the specified value to the noContext field.

public long

Returns:

the value of the measure.withContext field.
measure_withContext
()

public YGNode
measure_withContext(long value)

Sets the specified value to the withContext field.

public static YGBaselineFunc
nbaseline_noContext(long struct)

Unsafe version of baseline_noContext.

public static void
nbaseline_noContext(long struct, YGBaselineFuncI value)

Unsafe version of baseline_noContext.

public static long
nbaseline_withContext(long struct)

Unsafe version of baseline_withContext.

public static void
nbaseline_withContext(long struct, long value)

Unsafe version of baseline_withContext.

public static long
nchildren(long struct)

public static void
nchildren(long struct, long value)

public static long
nconfig(long struct)

Unsafe version of config.

public static void
nconfig(long struct, long value)

Unsafe version of config.

public static long
ncontext(long struct)

Unsafe version of context.

public static void
ncontext(long struct, long value)

Unsafe version of context.

public static YGDirtiedFunc
ndirtied(long struct)

Unsafe version of dirtied.

public static void
ndirtied(long struct, YGDirtiedFuncI value)

Unsafe version of dirtied.

public static YGNodeFlags
nflags(long struct)

Unsafe version of flags.

public static void
nflags(long struct, YGNodeFlags value)

Unsafe version of flags.

public static YGLayout
nlayout(long struct)

Unsafe version of layout.

public static void
nlayout(long struct, YGLayout value)

Unsafe version of layout.

public static int
nlineIndex(long struct)

Unsafe version of lineIndex.

public static void
nlineIndex(long struct, int value)

Unsafe version of lineIndex.

public static YGMeasureFunc
nmeasure_noContext(long struct)

Unsafe version of measure_noContext.

public static void
nmeasure_noContext(long struct, YGMeasureFuncI value)

Unsafe version of measure_noContext.

public static long
nmeasure_withContext(long struct)

Unsafe version of measure_withContext.

public static void
nmeasure_withContext(long struct, long value)

Unsafe version of measure_withContext.

public static long
nowner(long struct)

Unsafe version of owner.

public static void
nowner(long struct, long value)

Unsafe version of owner.

public static YGPrintFunc
nprint_noContext(long struct)

Unsafe version of print_noContext.

public static void
nprint_noContext(long struct, YGPrintFuncI value)

Unsafe version of print_noContext.

public static long
nprint_withContext(long struct)

Unsafe version of print_withContext.

public static void
nprint_withContext(long struct, long value)

Unsafe version of print_withContext.

public static YGValue.Buffer
nresolvedDimensions(long struct)

Unsafe version of resolvedDimensions.

public static YGValue
nresolvedDimensions(long struct, int index)

Unsafe version of resolvedDimensions.

public static void
nresolvedDimensions(long struct, YGValue.Buffer value)

Unsafe version of resolvedDimensions.

public static void
nresolvedDimensions(long struct, int index, YGValue value)

Unsafe version of resolvedDimensions.

public static YGStyle
nstyle(long struct)

Unsafe version of style.

public static void
nstyle(long struct, YGStyle value)

Unsafe version of style.

public long

Returns:

the value of the owner field.
owner
()

public YGNode
owner(long value)

Sets the specified value to the owner field.

public YGValue.Buffer

Returns:

a YGValue.Buffer view of the resolvedDimensions field.
resolvedDimensions
()

public YGValue

Returns:

a YGValue view of the struct at the specified index of the resolvedDimensions field.
resolvedDimensions
(int index)

public YGNode
resolvedDimensions(YGValue.Buffer value)

Copies the specified YGValue.Buffer to the resolvedDimensions field.

public YGNode
resolvedDimensions(int index, YGValue value)

Copies the specified YGValue at the specified index of the resolvedDimensions field.

public YGNode
resolvedDimensions(Consumer<YGValue.Buffer> consumer)

Passes the resolvedDimensions field to the specified Consumer.

public YGNode
resolvedDimensions(int index, Consumer<YGValue> consumer)

Passes the element at index of the resolvedDimensions field to the specified Consumer.

public YGNode

Returns:

this struct
set
(YGNode
the source struct
src
)

Copies the specified struct data to this struct.

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
public YGStyle

Returns:

a YGStyle view of the style field.
style
()

public YGNode
style(YGStyle value)

Copies the specified YGStyle to the style field.

Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate