public class YGNode
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
struct YGNodeLWJGL {
void * context;
bool hasNewLayout : 1;
bool isReferenceBaseline : 1;
bool isDirty : 1;
YGNodeType nodeType : 1;
bool measureUsesContext : 1;
bool baselineUsesContext : 1;
bool printUsesContext : 1;
bool useWebDefaults : 1;
char[1];
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];
}| Modifier and Type | Class and Description |
|---|---|
static class |
YGNode.Buffer
An array of
YGNode structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
BASELINE
The struct member offsets.
|
static int |
BASELINE_NOCONTEXT
The struct member offsets.
|
static int |
BASELINE_WITHCONTEXT
The struct member offsets.
|
static int |
BITFIELD
The struct member offsets.
|
static int |
CHILDREN
The struct member offsets.
|
static int |
CONFIG
The struct member offsets.
|
static int |
CONTEXT
The struct member offsets.
|
static int |
DIRTIED
The struct member offsets.
|
static int |
LAYOUT
The struct member offsets.
|
static int |
LINEINDEX
The struct member offsets.
|
static int |
MEASURE
The struct member offsets.
|
static int |
MEASURE_NOCONTEXT
The struct member offsets.
|
static int |
MEASURE_WITHCONTEXT
The struct member offsets.
|
static int |
OWNER
The struct member offsets.
|
static int |
PRINT
The struct member offsets.
|
static int |
PRINT_NOCONTEXT
The struct member offsets.
|
static int |
PRINT_WITHCONTEXT
The struct member offsets.
|
static int |
RESOLVEDDIMENSIONS
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
STYLE
The struct member offsets.
|
| Constructor and Description |
|---|
YGNode(java.nio.ByteBuffer container)
Creates a
YGNode instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
YGBaselineFunc |
baseline_noContext()
Returns the value of the
baseline.noContext field. |
YGNode |
baseline_noContext(YGBaselineFuncI value)
Sets the specified value to the
baseline.noContext field. |
long |
baseline_withContext()
Returns the value of the
baseline.withContext field. |
YGNode |
baseline_withContext(long value)
Sets the specified value to the
baseline.withContext field. |
boolean |
baselineUsesContext()
Returns the value of the
baselineUsesContext field. |
YGNode |
baselineUsesContext(boolean value)
Sets the specified value to the
baselineUsesContext field. |
static YGNode |
calloc()
Returns a new
YGNode instance allocated with memCalloc. |
static YGNode.Buffer |
calloc(int capacity)
Returns a new
YGNode.Buffer instance allocated with memCalloc. |
static YGNode |
callocStack()
Returns a new
YGNode instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static YGNode.Buffer |
callocStack(int capacity)
Returns a new
YGNode.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static YGNode.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
YGNode.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static YGNode |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
YGNode instance allocated on the specified MemoryStack and initializes all its bits to zero. |
long |
config()
Returns the value of the
config field. |
YGNode |
config(long value)
Sets the specified value to the
config field. |
long |
context()
Returns the value of the
context field. |
YGNode |
context(long value)
Sets the specified value to the
context field. |
static YGNode |
create()
Returns a new
YGNode instance allocated with BufferUtils. |
static YGNode.Buffer |
create(int capacity)
Returns a new
YGNode.Buffer instance allocated with BufferUtils. |
static YGNode |
create(long address)
Returns a new
YGNode instance for the specified memory address. |
static YGNode.Buffer |
create(long address,
int capacity)
Create a
YGNode.Buffer instance at the specified memory. |
static YGNode |
createSafe(long address)
|
static YGNode.Buffer |
createSafe(long address,
int capacity)
|
YGDirtiedFunc |
dirtied()
Returns the value of the
dirtied field. |
YGNode |
dirtied(YGDirtiedFuncI value)
Sets the specified value to the
dirtied field. |
boolean |
hasNewLayout()
Returns the value of the
hasNewLayout field. |
YGNode |
hasNewLayout(boolean value)
Sets the specified value to the
hasNewLayout field. |
boolean |
isDirty()
Returns the value of the
isDirty field. |
YGNode |
isDirty(boolean value)
Sets the specified value to the
isDirty field. |
boolean |
isReferenceBaseline()
Returns the value of the
isReferenceBaseline field. |
YGNode |
isReferenceBaseline(boolean value)
Sets the specified value to the
isReferenceBaseline field. |
YGLayout |
layout()
Returns a
YGLayout view of the layout field. |
YGNode |
layout(YGLayout value)
Copies the specified
YGLayout to the layout field. |
int |
lineIndex()
Returns the value of the
lineIndex field. |
YGNode |
lineIndex(int value)
Sets the specified value to the
lineIndex field. |
static YGNode |
malloc()
Returns a new
YGNode instance allocated with memAlloc. |
static YGNode.Buffer |
malloc(int capacity)
Returns a new
YGNode.Buffer instance allocated with memAlloc. |
static YGNode |
mallocStack()
Returns a new
YGNode instance allocated on the thread-local MemoryStack. |
static YGNode.Buffer |
mallocStack(int capacity)
Returns a new
YGNode.Buffer instance allocated on the thread-local MemoryStack. |
static YGNode.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
YGNode.Buffer instance allocated on the specified MemoryStack. |
static YGNode |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
YGNode instance allocated on the specified MemoryStack. |
YGMeasureFunc |
measure_noContext()
Returns the value of the
measure.noContext field. |
YGNode |
measure_noContext(YGMeasureFuncI value)
Sets the specified value to the
measure.noContext field. |
long |
measure_withContext()
Returns the value of the
measure.withContext field. |
YGNode |
measure_withContext(long value)
Sets the specified value to the
measure.withContext field. |
boolean |
measureUsesContext()
Returns the value of the
measureUsesContext field. |
YGNode |
measureUsesContext(boolean value)
Sets the specified value to the
measureUsesContext field. |
static YGBaselineFunc |
nbaseline_noContext(long struct)
Unsafe version of
baseline_noContext(). |
static void |
nbaseline_noContext(long struct,
YGBaselineFuncI value)
Unsafe version of
baseline_noContext. |
static long |
nbaseline_withContext(long struct)
Unsafe version of
baseline_withContext(). |
static void |
nbaseline_withContext(long struct,
long value)
Unsafe version of
baseline_withContext. |
static boolean |
nbaselineUsesContext(long struct)
Unsafe version of
baselineUsesContext(). |
static void |
nbaselineUsesContext(long struct,
boolean value)
Unsafe version of
baselineUsesContext. |
static byte |
nbitfield(long struct) |
static void |
nbitfield(long struct,
byte value) |
static long |
nchildren(long struct) |
static void |
nchildren(long struct,
long value) |
static long |
nconfig(long struct)
Unsafe version of
config(). |
static void |
nconfig(long struct,
long value)
Unsafe version of
config. |
static long |
ncontext(long struct)
Unsafe version of
context(). |
static void |
ncontext(long struct,
long value)
Unsafe version of
context. |
static YGDirtiedFunc |
ndirtied(long struct)
Unsafe version of
dirtied(). |
static void |
ndirtied(long struct,
YGDirtiedFuncI value)
Unsafe version of
dirtied. |
static boolean |
nhasNewLayout(long struct)
Unsafe version of
hasNewLayout(). |
static void |
nhasNewLayout(long struct,
boolean value)
Unsafe version of
hasNewLayout. |
static boolean |
nisDirty(long struct)
Unsafe version of
isDirty(). |
static void |
nisDirty(long struct,
boolean value)
Unsafe version of
isDirty. |
static boolean |
nisReferenceBaseline(long struct)
Unsafe version of
isReferenceBaseline(). |
static void |
nisReferenceBaseline(long struct,
boolean value)
Unsafe version of
isReferenceBaseline. |
static YGLayout |
nlayout(long struct)
Unsafe version of
layout(). |
static void |
nlayout(long struct,
YGLayout value)
Unsafe version of
layout. |
static int |
nlineIndex(long struct)
Unsafe version of
lineIndex(). |
static void |
nlineIndex(long struct,
int value)
Unsafe version of
lineIndex. |
static YGMeasureFunc |
nmeasure_noContext(long struct)
Unsafe version of
measure_noContext(). |
static void |
nmeasure_noContext(long struct,
YGMeasureFuncI value)
Unsafe version of
measure_noContext. |
static long |
nmeasure_withContext(long struct)
Unsafe version of
measure_withContext(). |
static void |
nmeasure_withContext(long struct,
long value)
Unsafe version of
measure_withContext. |
static boolean |
nmeasureUsesContext(long struct)
Unsafe version of
measureUsesContext(). |
static void |
nmeasureUsesContext(long struct,
boolean value)
Unsafe version of
measureUsesContext. |
static int |
nnodeType(long struct)
Unsafe version of
nodeType(). |
static void |
nnodeType(long struct,
int value)
Unsafe version of
nodeType. |
int |
nodeType()
Returns the value of the
nodeType field. |
YGNode |
nodeType(int value)
Sets the specified value to the
nodeType field. |
static long |
nowner(long struct)
Unsafe version of
owner(). |
static void |
nowner(long struct,
long value)
Unsafe version of
owner. |
static YGPrintFunc |
nprint_noContext(long struct)
Unsafe version of
print_noContext(). |
static void |
nprint_noContext(long struct,
YGPrintFuncI value)
Unsafe version of
print_noContext. |
static long |
nprint_withContext(long struct)
Unsafe version of
print_withContext(). |
static void |
nprint_withContext(long struct,
long value)
Unsafe version of
print_withContext. |
static boolean |
nprintUsesContext(long struct)
Unsafe version of
printUsesContext(). |
static void |
nprintUsesContext(long struct,
boolean value)
Unsafe version of
printUsesContext. |
static YGValue.Buffer |
nresolvedDimensions(long struct)
Unsafe version of
resolvedDimensions(). |
static YGValue |
nresolvedDimensions(long struct,
int index)
Unsafe version of
resolvedDimensions. |
static void |
nresolvedDimensions(long struct,
int index,
YGValue value)
Unsafe version of
resolvedDimensions. |
static void |
nresolvedDimensions(long struct,
YGValue.Buffer value)
Unsafe version of
resolvedDimensions. |
static YGStyle |
nstyle(long struct)
Unsafe version of
style(). |
static void |
nstyle(long struct,
YGStyle value)
Unsafe version of
style. |
static boolean |
nuseWebDefaults(long struct)
Unsafe version of
useWebDefaults(). |
static void |
nuseWebDefaults(long struct,
boolean value)
Unsafe version of
useWebDefaults. |
long |
owner()
Returns the value of the
owner field. |
YGNode |
owner(long value)
Sets the specified value to the
owner field. |
YGPrintFunc |
print_noContext()
Returns the value of the
print.noContext field. |
YGNode |
print_noContext(YGPrintFuncI value)
Sets the specified value to the
print.noContext field. |
long |
print_withContext()
Returns the value of the
print.withContext field. |
YGNode |
print_withContext(long value)
Sets the specified value to the
print.withContext field. |
boolean |
printUsesContext()
Returns the value of the
printUsesContext field. |
YGNode |
printUsesContext(boolean value)
Sets the specified value to the
printUsesContext field. |
YGValue.Buffer |
resolvedDimensions()
Returns a
YGValue.Buffer view of the resolvedDimensions field. |
YGNode |
resolvedDimensions(java.util.function.Consumer<YGValue.Buffer> consumer)
Passes the
resolvedDimensions field to the specified Consumer. |
YGValue |
resolvedDimensions(int index)
Returns a
YGValue view of the struct at the specified index of the resolvedDimensions field. |
YGNode |
resolvedDimensions(int index,
java.util.function.Consumer<YGValue> consumer)
Passes the element at
index of the resolvedDimensions field to the specified Consumer. |
YGNode |
resolvedDimensions(int index,
YGValue value)
Copies the specified
YGValue at the specified index of the resolvedDimensions field. |
YGNode |
resolvedDimensions(YGValue.Buffer value)
Copies the specified
YGValue.Buffer to the resolvedDimensions field. |
YGNode |
set(YGNode src)
Copies the specified struct data to this struct.
|
int |
sizeof() |
YGStyle |
style()
Returns a
YGStyle view of the style field. |
YGNode |
style(YGStyle value)
Copies the specified
YGStyle to the style field. |
boolean |
useWebDefaults()
Returns the value of the
useWebDefaults field. |
YGNode |
useWebDefaults(boolean value)
Sets the specified value to the
useWebDefaults field. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int CONTEXT
public static final int BITFIELD
public static final int MEASURE
public static final int MEASURE_NOCONTEXT
public static final int MEASURE_WITHCONTEXT
public static final int BASELINE
public static final int BASELINE_NOCONTEXT
public static final int BASELINE_WITHCONTEXT
public static final int PRINT
public static final int PRINT_NOCONTEXT
public static final int PRINT_WITHCONTEXT
public static final int DIRTIED
public static final int STYLE
public static final int LAYOUT
public static final int LINEINDEX
public static final int OWNER
public static final int CHILDREN
public static final int CONFIG
public static final int RESOLVEDDIMENSIONS
public YGNode(java.nio.ByteBuffer container)
YGNode instance at the current position of the specified ByteBuffer 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.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic long context()
context field.public boolean hasNewLayout()
hasNewLayout field.public boolean isReferenceBaseline()
isReferenceBaseline field.public boolean isDirty()
isDirty field.public int nodeType()
nodeType field.public boolean measureUsesContext()
measureUsesContext field.public boolean baselineUsesContext()
baselineUsesContext field.public boolean printUsesContext()
printUsesContext field.public boolean useWebDefaults()
useWebDefaults field.@Nullable public YGMeasureFunc measure_noContext()
measure.noContext field.public long measure_withContext()
measure.withContext field.@Nullable public YGBaselineFunc baseline_noContext()
baseline.noContext field.public long baseline_withContext()
baseline.withContext field.@Nullable public YGPrintFunc print_noContext()
print.noContext field.public long print_withContext()
print.withContext field.@Nullable public YGDirtiedFunc dirtied()
dirtied field.public int lineIndex()
lineIndex field.public long owner()
owner field.public long config()
config field.public YGValue.Buffer resolvedDimensions()
YGValue.Buffer view of the resolvedDimensions field.public YGValue resolvedDimensions(int index)
YGValue view of the struct at the specified index of the resolvedDimensions field.public YGNode context(long value)
context field.public YGNode hasNewLayout(boolean value)
hasNewLayout field.public YGNode isReferenceBaseline(boolean value)
isReferenceBaseline field.public YGNode isDirty(boolean value)
isDirty field.public YGNode nodeType(int value)
nodeType field.public YGNode measureUsesContext(boolean value)
measureUsesContext field.public YGNode baselineUsesContext(boolean value)
baselineUsesContext field.public YGNode printUsesContext(boolean value)
printUsesContext field.public YGNode useWebDefaults(boolean value)
useWebDefaults field.public YGNode measure_noContext(@Nullable YGMeasureFuncI value)
measure.noContext field.public YGNode measure_withContext(long value)
measure.withContext field.public YGNode baseline_noContext(@Nullable YGBaselineFuncI value)
baseline.noContext field.public YGNode baseline_withContext(long value)
baseline.withContext field.public YGNode print_noContext(@Nullable YGPrintFuncI value)
print.noContext field.public YGNode print_withContext(long value)
print.withContext field.public YGNode dirtied(@Nullable YGDirtiedFuncI value)
dirtied field.public YGNode lineIndex(int value)
lineIndex field.public YGNode owner(long value)
owner field.public YGNode config(long value)
config field.public YGNode resolvedDimensions(YGValue.Buffer value)
YGValue.Buffer to the resolvedDimensions field.public YGNode resolvedDimensions(int index, YGValue value)
YGValue at the specified index of the resolvedDimensions field.public YGNode resolvedDimensions(java.util.function.Consumer<YGValue.Buffer> consumer)
resolvedDimensions field to the specified Consumer.public YGNode resolvedDimensions(int index, java.util.function.Consumer<YGValue> consumer)
index of the resolvedDimensions field to the specified Consumer.public YGNode set(YGNode src)
src - the source structpublic static YGNode malloc()
YGNode instance allocated with memAlloc. The instance must be explicitly freed.public static YGNode calloc()
YGNode instance allocated with memCalloc. The instance must be explicitly freed.public static YGNode create()
YGNode instance allocated with BufferUtils.public static YGNode create(long address)
YGNode instance for the specified memory address.@Nullable public static YGNode createSafe(long address)
public static YGNode.Buffer malloc(int capacity)
YGNode.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static YGNode.Buffer calloc(int capacity)
YGNode.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static YGNode.Buffer create(int capacity)
YGNode.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static YGNode.Buffer create(long address, int capacity)
YGNode.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static YGNode.Buffer createSafe(long address, int capacity)
public static YGNode mallocStack()
YGNode instance allocated on the thread-local MemoryStack.public static YGNode callocStack()
YGNode instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static YGNode mallocStack(org.lwjgl.system.MemoryStack stack)
YGNode instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static YGNode callocStack(org.lwjgl.system.MemoryStack stack)
YGNode instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static YGNode.Buffer mallocStack(int capacity)
YGNode.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static YGNode.Buffer callocStack(int capacity)
YGNode.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static YGNode.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
YGNode.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static YGNode.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
YGNode.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacitypublic static long ncontext(long struct)
context().public static byte nbitfield(long struct)
public static boolean nhasNewLayout(long struct)
hasNewLayout().public static boolean nisReferenceBaseline(long struct)
isReferenceBaseline().public static boolean nisDirty(long struct)
isDirty().public static int nnodeType(long struct)
nodeType().public static boolean nmeasureUsesContext(long struct)
measureUsesContext().public static boolean nbaselineUsesContext(long struct)
baselineUsesContext().public static boolean nprintUsesContext(long struct)
printUsesContext().public static boolean nuseWebDefaults(long struct)
useWebDefaults().@Nullable public static YGMeasureFunc nmeasure_noContext(long struct)
measure_noContext().public static long nmeasure_withContext(long struct)
measure_withContext().@Nullable public static YGBaselineFunc nbaseline_noContext(long struct)
baseline_noContext().public static long nbaseline_withContext(long struct)
baseline_withContext().@Nullable public static YGPrintFunc nprint_noContext(long struct)
print_noContext().public static long nprint_withContext(long struct)
print_withContext().@Nullable public static YGDirtiedFunc ndirtied(long struct)
dirtied().public static int nlineIndex(long struct)
lineIndex().public static long nowner(long struct)
owner().public static long nchildren(long struct)
public static long nconfig(long struct)
config().public static YGValue.Buffer nresolvedDimensions(long struct)
resolvedDimensions().public static YGValue nresolvedDimensions(long struct, int index)
resolvedDimensions.public static void ncontext(long struct,
long value)
context.public static void nbitfield(long struct,
byte value)
public static void nhasNewLayout(long struct,
boolean value)
hasNewLayout.public static void nisReferenceBaseline(long struct,
boolean value)
isReferenceBaseline.public static void nisDirty(long struct,
boolean value)
isDirty.public static void nnodeType(long struct,
int value)
nodeType.public static void nmeasureUsesContext(long struct,
boolean value)
measureUsesContext.public static void nbaselineUsesContext(long struct,
boolean value)
baselineUsesContext.public static void nprintUsesContext(long struct,
boolean value)
printUsesContext.public static void nuseWebDefaults(long struct,
boolean value)
useWebDefaults.public static void nmeasure_noContext(long struct,
@Nullable
YGMeasureFuncI value)
measure_noContext.public static void nmeasure_withContext(long struct,
long value)
measure_withContext.public static void nbaseline_noContext(long struct,
@Nullable
YGBaselineFuncI value)
baseline_noContext.public static void nbaseline_withContext(long struct,
long value)
baseline_withContext.public static void nprint_noContext(long struct,
@Nullable
YGPrintFuncI value)
print_noContext.public static void nprint_withContext(long struct,
long value)
print_withContext.public static void ndirtied(long struct,
@Nullable
YGDirtiedFuncI value)
dirtied.public static void nlineIndex(long struct,
int value)
lineIndex.public static void nowner(long struct,
long value)
owner.public static void nchildren(long struct,
long value)
public static void nconfig(long struct,
long value)
config.public static void nresolvedDimensions(long struct,
YGValue.Buffer value)
resolvedDimensions.public static void nresolvedDimensions(long struct,
int index,
YGValue value)
resolvedDimensions.Copyright LWJGL. All Rights Reserved. License terms.