Package org.lwjgl.util.yoga
Class YGNode
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
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 Class Summary
Nested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.static final int
The struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorDescriptionYGNode
(ByteBuffer container) Creates aYGNode
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionSets the specified value to thenoContext
field.long
baseline_withContext
(long value) Sets the specified value to thewithContext
field.static YGNode
calloc()
Returns a newYGNode
instance allocated withmemCalloc
.static YGNode.Buffer
calloc
(int capacity) Returns a newYGNode.Buffer
instance allocated withmemCalloc
.static YGNode.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newYGNode.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static YGNode
calloc
(MemoryStack stack) Returns a newYGNode
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static YGNode
Deprecated.static YGNode.Buffer
callocStack
(int capacity) Deprecated.static YGNode.Buffer
callocStack
(int capacity, MemoryStack stack) Deprecated.static YGNode
callocStack
(MemoryStack stack) Deprecated.long
config()
config
(long value) Sets the specified value to theconfig
field.long
context()
context
(long value) Sets the specified value to thecontext
field.static YGNode
create()
Returns a newYGNode
instance allocated withBufferUtils
.static YGNode.Buffer
create
(int capacity) Returns a newYGNode.Buffer
instance allocated withBufferUtils
.static YGNode
create
(long address) Returns a newYGNode
instance for the specified memory address.static YGNode.Buffer
create
(long address, int capacity) Create aYGNode.Buffer
instance at the specified memory.static YGNode
createSafe
(long address) static YGNode.Buffer
createSafe
(long address, int capacity) dirtied()
dirtied
(YGDirtiedFuncI value) Sets the specified value to thedirtied
field.flags()
flags
(Consumer<YGNodeFlags> consumer) Passes theflags
field to the specifiedConsumer
.flags
(YGNodeFlags value) Copies the specifiedYGNodeFlags
to theflags
field.layout()
Copies the specifiedYGLayout
to thelayout
field.int
lineIndex
(int value) Sets the specified value to thelineIndex
field.static YGNode
malloc()
Returns a newYGNode
instance allocated withmemAlloc
.static YGNode.Buffer
malloc
(int capacity) Returns a newYGNode.Buffer
instance allocated withmemAlloc
.static YGNode.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newYGNode.Buffer
instance allocated on the specifiedMemoryStack
.static YGNode
malloc
(MemoryStack stack) Returns a newYGNode
instance allocated on the specifiedMemoryStack
.static YGNode
Deprecated.static YGNode.Buffer
mallocStack
(int capacity) Deprecated.static YGNode.Buffer
mallocStack
(int capacity, MemoryStack stack) Deprecated.static YGNode
mallocStack
(MemoryStack stack) Deprecated.measure_noContext
(YGMeasureFuncI value) Sets the specified value to thenoContext
field.long
measure_withContext
(long value) Sets the specified value to thewithContext
field.static YGBaselineFunc
nbaseline_noContext
(long struct) Unsafe version ofbaseline_noContext()
.static void
nbaseline_noContext
(long struct, YGBaselineFuncI value) Unsafe version ofbaseline_noContext
.static long
nbaseline_withContext
(long struct) Unsafe version ofbaseline_withContext()
.static void
nbaseline_withContext
(long struct, long value) Unsafe version ofbaseline_withContext
.static long
nchildren
(long struct) static void
nchildren
(long struct, long value) static long
nconfig
(long struct) Unsafe version ofconfig()
.static void
nconfig
(long struct, long value) Unsafe version ofconfig
.static long
ncontext
(long struct) Unsafe version ofcontext()
.static void
ncontext
(long struct, long value) Unsafe version ofcontext
.static YGDirtiedFunc
ndirtied
(long struct) Unsafe version ofdirtied()
.static void
ndirtied
(long struct, YGDirtiedFuncI value) Unsafe version ofdirtied
.static YGNodeFlags
nflags
(long struct) Unsafe version offlags()
.static void
nflags
(long struct, YGNodeFlags value) Unsafe version offlags
.static YGLayout
nlayout
(long struct) Unsafe version oflayout()
.static void
Unsafe version oflayout
.static int
nlineIndex
(long struct) Unsafe version oflineIndex()
.static void
nlineIndex
(long struct, int value) Unsafe version oflineIndex
.static YGMeasureFunc
nmeasure_noContext
(long struct) Unsafe version ofmeasure_noContext()
.static void
nmeasure_noContext
(long struct, YGMeasureFuncI value) Unsafe version ofmeasure_noContext
.static long
nmeasure_withContext
(long struct) Unsafe version ofmeasure_withContext()
.static void
nmeasure_withContext
(long struct, long value) Unsafe version ofmeasure_withContext
.static long
nowner
(long struct) Unsafe version ofowner()
.static void
nowner
(long struct, long value) Unsafe version ofowner
.static YGPrintFunc
nprint_noContext
(long struct) Unsafe version ofprint_noContext()
.static void
nprint_noContext
(long struct, YGPrintFuncI value) Unsafe version ofprint_noContext
.static long
nprint_withContext
(long struct) Unsafe version ofprint_withContext()
.static void
nprint_withContext
(long struct, long value) Unsafe version ofprint_withContext
.static YGValue.Buffer
nresolvedDimensions
(long struct) Unsafe version ofresolvedDimensions()
.static YGValue
nresolvedDimensions
(long struct, int index) Unsafe version ofresolvedDimensions
.static void
nresolvedDimensions
(long struct, int index, YGValue value) Unsafe version ofresolvedDimensions
.static void
nresolvedDimensions
(long struct, YGValue.Buffer value) Unsafe version ofresolvedDimensions
.static YGStyle
nstyle
(long struct) Unsafe version ofstyle()
.static void
Unsafe version ofstyle
.long
owner()
owner
(long value) Sets the specified value to theowner
field.print_noContext
(YGPrintFuncI value) Sets the specified value to thenoContext
field.long
print_withContext
(long value) Sets the specified value to thewithContext
field.resolvedDimensions
(int index) resolvedDimensions
(int index, Consumer<YGValue> consumer) resolvedDimensions
(int index, YGValue value) Copies the specifiedYGValue
at the specified index of theresolvedDimensions
field.resolvedDimensions
(Consumer<YGValue.Buffer> consumer) Passes theresolvedDimensions
field to the specifiedConsumer
.resolvedDimensions
(YGValue.Buffer value) Copies the specifiedYGValue.Buffer
to theresolvedDimensions
field.Copies the specified struct data to this struct.int
sizeof()
Returnssizeof(struct)
.style()
Copies the specifiedYGStyle
to thestyle
field.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
CONTEXT
public static final int CONTEXTThe struct member offsets. -
FLAGS
public static final int FLAGSThe struct member offsets. -
MEASURE
public static final int MEASUREThe struct member offsets. -
MEASURE_NOCONTEXT
public static final int MEASURE_NOCONTEXTThe struct member offsets. -
MEASURE_WITHCONTEXT
public static final int MEASURE_WITHCONTEXTThe struct member offsets. -
BASELINE
public static final int BASELINEThe struct member offsets. -
BASELINE_NOCONTEXT
public static final int BASELINE_NOCONTEXTThe struct member offsets. -
BASELINE_WITHCONTEXT
public static final int BASELINE_WITHCONTEXTThe struct member offsets. -
PRINT
public static final int PRINTThe struct member offsets. -
PRINT_NOCONTEXT
public static final int PRINT_NOCONTEXTThe struct member offsets. -
PRINT_WITHCONTEXT
public static final int PRINT_WITHCONTEXTThe struct member offsets. -
DIRTIED
public static final int DIRTIEDThe struct member offsets. -
STYLE
public static final int STYLEThe struct member offsets. -
LAYOUT
public static final int LAYOUTThe struct member offsets. -
LINEINDEX
public static final int LINEINDEXThe struct member offsets. -
OWNER
public static final int OWNERThe struct member offsets. -
CHILDREN
public static final int CHILDRENThe struct member offsets. -
CONFIG
public static final int CONFIGThe struct member offsets. -
RESOLVEDDIMENSIONS
public static final int RESOLVEDDIMENSIONSThe struct member offsets.
-
-
Constructor Details
-
YGNode
Creates aYGNode
instance at the current position of the specifiedByteBuffer
container. Changes to the buffer's content will be visible to the struct instance and vice versa.The created instance holds a strong reference to the container object.
-
-
Method Details
-
sizeof
public int sizeof()Description copied from class:Struct
Returnssizeof(struct)
. -
context
public long context()- Returns:
- the value of the
context
field.
-
flags
- Returns:
- a
YGNodeFlags
view of theflags
field.
-
measure_noContext
- Returns:
- the value of the
measure.noContext
field.
-
measure_withContext
public long measure_withContext()- Returns:
- the value of the
measure.withContext
field.
-
baseline_noContext
- Returns:
- the value of the
baseline.noContext
field.
-
baseline_withContext
public long baseline_withContext()- Returns:
- the value of the
baseline.withContext
field.
-
print_noContext
- Returns:
- the value of the
print.noContext
field.
-
print_withContext
public long print_withContext()- Returns:
- the value of the
print.withContext
field.
-
dirtied
- Returns:
- the value of the
dirtied
field.
-
style
- Returns:
- a
YGStyle
view of thestyle
field.
-
layout
- Returns:
- a
YGLayout
view of thelayout
field.
-
lineIndex
public int lineIndex()- Returns:
- the value of the
lineIndex
field.
-
owner
public long owner()- Returns:
- the value of the
owner
field.
-
config
public long config()- Returns:
- the value of the
config
field.
-
resolvedDimensions
- Returns:
- a
YGValue
.Buffer view of theresolvedDimensions
field.
-
resolvedDimensions
- Returns:
- a
YGValue
view of the struct at the specified index of theresolvedDimensions
field.
-
context
Sets the specified value to thecontext
field. -
flags
Copies the specifiedYGNodeFlags
to theflags
field. -
flags
Passes theflags
field to the specifiedConsumer
. -
measure_noContext
Sets the specified value to thenoContext
field. -
measure_withContext
Sets the specified value to thewithContext
field. -
baseline_noContext
Sets the specified value to thenoContext
field. -
baseline_withContext
Sets the specified value to thewithContext
field. -
print_noContext
Sets the specified value to thenoContext
field. -
print_withContext
Sets the specified value to thewithContext
field. -
dirtied
Sets the specified value to thedirtied
field. -
style
Copies the specifiedYGStyle
to thestyle
field. -
layout
Copies the specifiedYGLayout
to thelayout
field. -
lineIndex
Sets the specified value to thelineIndex
field. -
owner
Sets the specified value to theowner
field. -
config
Sets the specified value to theconfig
field. -
resolvedDimensions
Copies the specifiedYGValue.Buffer
to theresolvedDimensions
field. -
resolvedDimensions
Copies the specifiedYGValue
at the specified index of theresolvedDimensions
field. -
resolvedDimensions
Passes theresolvedDimensions
field to the specifiedConsumer
. -
resolvedDimensions
-
set
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
Returns a newYGNode
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newYGNode
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newYGNode
instance allocated withBufferUtils
. -
create
Returns a newYGNode
instance for the specified memory address. -
createSafe
-
malloc
Returns a newYGNode.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newYGNode.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newYGNode.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aYGNode.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
malloc
Returns a newYGNode
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newYGNode
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newYGNode.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newYGNode.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
ncontext
public static long ncontext(long struct) Unsafe version ofcontext()
. -
nflags
Unsafe version offlags()
. -
nmeasure_noContext
Unsafe version ofmeasure_noContext()
. -
nmeasure_withContext
public static long nmeasure_withContext(long struct) Unsafe version ofmeasure_withContext()
. -
nbaseline_noContext
Unsafe version ofbaseline_noContext()
. -
nbaseline_withContext
public static long nbaseline_withContext(long struct) Unsafe version ofbaseline_withContext()
. -
nprint_noContext
Unsafe version ofprint_noContext()
. -
nprint_withContext
public static long nprint_withContext(long struct) Unsafe version ofprint_withContext()
. -
ndirtied
Unsafe version ofdirtied()
. -
nstyle
Unsafe version ofstyle()
. -
nlayout
Unsafe version oflayout()
. -
nlineIndex
public static int nlineIndex(long struct) Unsafe version oflineIndex()
. -
nowner
public static long nowner(long struct) Unsafe version ofowner()
. -
nchildren
public static long nchildren(long struct) -
nconfig
public static long nconfig(long struct) Unsafe version ofconfig()
. -
nresolvedDimensions
Unsafe version ofresolvedDimensions()
. -
nresolvedDimensions
Unsafe version ofresolvedDimensions
. -
ncontext
public static void ncontext(long struct, long value) Unsafe version ofcontext
. -
nflags
Unsafe version offlags
. -
nmeasure_noContext
Unsafe version ofmeasure_noContext
. -
nmeasure_withContext
public static void nmeasure_withContext(long struct, long value) Unsafe version ofmeasure_withContext
. -
nbaseline_noContext
Unsafe version ofbaseline_noContext
. -
nbaseline_withContext
public static void nbaseline_withContext(long struct, long value) Unsafe version ofbaseline_withContext
. -
nprint_noContext
Unsafe version ofprint_noContext
. -
nprint_withContext
public static void nprint_withContext(long struct, long value) Unsafe version ofprint_withContext
. -
ndirtied
Unsafe version ofdirtied
. -
nstyle
Unsafe version ofstyle
. -
nlayout
Unsafe version oflayout
. -
nlineIndex
public static void nlineIndex(long struct, int value) Unsafe version oflineIndex
. -
nowner
public static void nowner(long struct, long value) Unsafe version ofowner
. -
nchildren
public static void nchildren(long struct, long value) -
nconfig
public static void nconfig(long struct, long value) Unsafe version ofconfig
. -
nresolvedDimensions
Unsafe version ofresolvedDimensions
. -
nresolvedDimensions
Unsafe version ofresolvedDimensions
.
-