public class YGLayout
extends org.lwjgl.system.Struct
struct YGLayout {
float positions[4];
float dimensions[2];
float margin[4];
float border[4];
float padding[4];
YGDirection direction : 2;
bool didUseLegacyFlag : 1;
bool doesLegacyStretchFlagAffectsLayout : 1;
bool hadOverflow : 1;
uint32_t computedFlexBasisGeneration;
YGFloatOptional computedFlexBasis;
uint32_t generationCount;
YGDirection lastOwnerDirection;
uint32_t nextCachedMeasurementsIndex;
YGCachedMeasurement cachedMeasurements[16];
float measuredDimensions[2];
YGCachedMeasurement cachedLayout;
}| Modifier and Type | Class and Description |
|---|---|
static class |
YGLayout.Buffer
An array of
YGLayout structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
BITFIELD
The struct member offsets.
|
static int |
BORDER
The struct member offsets.
|
static int |
CACHEDLAYOUT
The struct member offsets.
|
static int |
CACHEDMEASUREMENTS
The struct member offsets.
|
static int |
COMPUTEDFLEXBASIS
The struct member offsets.
|
static int |
COMPUTEDFLEXBASISGENERATION
The struct member offsets.
|
static int |
DIMENSIONS
The struct member offsets.
|
static int |
GENERATIONCOUNT
The struct member offsets.
|
static int |
LASTOWNERDIRECTION
The struct member offsets.
|
static int |
MARGIN
The struct member offsets.
|
static int |
MEASUREDDIMENSIONS
The struct member offsets.
|
static int |
NEXTCACHEDMEASUREMENTSINDEX
The struct member offsets.
|
static int |
PADDING
The struct member offsets.
|
static int |
POSITIONS
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
| Constructor and Description |
|---|
YGLayout(java.nio.ByteBuffer container)
Creates a
YGLayout instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
java.nio.FloatBuffer |
border()
Returns a
FloatBuffer view of the border field. |
float |
border(int index)
Returns the value at the specified index of the
border field. |
YGCachedMeasurement |
cachedLayout()
Returns a
YGCachedMeasurement view of the cachedLayout field. |
YGCachedMeasurement.Buffer |
cachedMeasurements()
Returns a
YGCachedMeasurement.Buffer view of the cachedMeasurements field. |
YGCachedMeasurement |
cachedMeasurements(int index)
Returns a
YGCachedMeasurement view of the struct at the specified index of the cachedMeasurements field. |
YGFloatOptional |
computedFlexBasis()
Returns a
YGFloatOptional view of the computedFlexBasis field. |
int |
computedFlexBasisGeneration()
Returns the value of the
computedFlexBasisGeneration field. |
static YGLayout |
create(long address)
Returns a new
YGLayout instance for the specified memory address. |
static YGLayout.Buffer |
create(long address,
int capacity)
Create a
YGLayout.Buffer instance at the specified memory. |
static YGLayout |
createSafe(long address)
|
static YGLayout.Buffer |
createSafe(long address,
int capacity)
|
boolean |
didUseLegacyFlag()
Returns the value of the
didUseLegacyFlag field. |
java.nio.FloatBuffer |
dimensions()
Returns a
FloatBuffer view of the dimensions field. |
float |
dimensions(int index)
Returns the value at the specified index of the
dimensions field. |
int |
direction()
Returns the value of the
direction field. |
boolean |
doesLegacyStretchFlagAffectsLayout()
Returns the value of the
doesLegacyStretchFlagAffectsLayout field. |
int |
generationCount()
Returns the value of the
generationCount field. |
boolean |
hadOverflow()
Returns the value of the
hadOverflow field. |
int |
lastOwnerDirection()
Returns the value of the
lastOwnerDirection field. |
java.nio.FloatBuffer |
margin()
Returns a
FloatBuffer view of the margin field. |
float |
margin(int index)
Returns the value at the specified index of the
margin field. |
java.nio.FloatBuffer |
measuredDimensions()
Returns a
FloatBuffer view of the measuredDimensions field. |
float |
measuredDimensions(int index)
Returns the value at the specified index of the
measuredDimensions field. |
static byte |
nbitfield(long struct) |
static java.nio.FloatBuffer |
nborder(long struct)
Unsafe version of
border(). |
static float |
nborder(long struct,
int index)
Unsafe version of
border. |
static YGCachedMeasurement |
ncachedLayout(long struct)
Unsafe version of
cachedLayout(). |
static YGCachedMeasurement.Buffer |
ncachedMeasurements(long struct)
Unsafe version of
cachedMeasurements(). |
static YGCachedMeasurement |
ncachedMeasurements(long struct,
int index)
Unsafe version of
cachedMeasurements. |
static YGFloatOptional |
ncomputedFlexBasis(long struct)
Unsafe version of
computedFlexBasis(). |
static int |
ncomputedFlexBasisGeneration(long struct)
Unsafe version of
computedFlexBasisGeneration(). |
static boolean |
ndidUseLegacyFlag(long struct)
Unsafe version of
didUseLegacyFlag(). |
static java.nio.FloatBuffer |
ndimensions(long struct)
Unsafe version of
dimensions(). |
static float |
ndimensions(long struct,
int index)
Unsafe version of
dimensions. |
static int |
ndirection(long struct)
Unsafe version of
direction(). |
static boolean |
ndoesLegacyStretchFlagAffectsLayout(long struct)
Unsafe version of
doesLegacyStretchFlagAffectsLayout(). |
int |
nextCachedMeasurementsIndex()
Returns the value of the
nextCachedMeasurementsIndex field. |
static int |
ngenerationCount(long struct)
Unsafe version of
generationCount(). |
static boolean |
nhadOverflow(long struct)
Unsafe version of
hadOverflow(). |
static int |
nlastOwnerDirection(long struct)
Unsafe version of
lastOwnerDirection(). |
static java.nio.FloatBuffer |
nmargin(long struct)
Unsafe version of
margin(). |
static float |
nmargin(long struct,
int index)
Unsafe version of
margin. |
static java.nio.FloatBuffer |
nmeasuredDimensions(long struct)
Unsafe version of
measuredDimensions(). |
static float |
nmeasuredDimensions(long struct,
int index)
Unsafe version of
measuredDimensions. |
static int |
nnextCachedMeasurementsIndex(long struct)
Unsafe version of
nextCachedMeasurementsIndex(). |
static java.nio.FloatBuffer |
npadding(long struct)
Unsafe version of
padding(). |
static float |
npadding(long struct,
int index)
Unsafe version of
padding. |
static java.nio.FloatBuffer |
npositions(long struct)
Unsafe version of
positions(). |
static float |
npositions(long struct,
int index)
Unsafe version of
positions. |
java.nio.FloatBuffer |
padding()
Returns a
FloatBuffer view of the padding field. |
float |
padding(int index)
Returns the value at the specified index of the
padding field. |
java.nio.FloatBuffer |
positions()
Returns a
FloatBuffer view of the positions field. |
float |
positions(int index)
Returns the value at the specified index of the
positions field. |
int |
sizeof() |
public static final int SIZEOF
public static final int ALIGNOF
public static final int POSITIONS
public static final int DIMENSIONS
public static final int MARGIN
public static final int BORDER
public static final int PADDING
public static final int BITFIELD
public static final int COMPUTEDFLEXBASISGENERATION
public static final int COMPUTEDFLEXBASIS
public static final int GENERATIONCOUNT
public static final int LASTOWNERDIRECTION
public static final int NEXTCACHEDMEASUREMENTSINDEX
public static final int CACHEDMEASUREMENTS
public static final int MEASUREDDIMENSIONS
public static final int CACHEDLAYOUT
public YGLayout(java.nio.ByteBuffer container)
YGLayout 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 java.nio.FloatBuffer positions()
FloatBuffer view of the positions field.public float positions(int index)
positions field.public java.nio.FloatBuffer dimensions()
FloatBuffer view of the dimensions field.public float dimensions(int index)
dimensions field.public java.nio.FloatBuffer margin()
FloatBuffer view of the margin field.public float margin(int index)
margin field.public java.nio.FloatBuffer border()
FloatBuffer view of the border field.public float border(int index)
border field.public java.nio.FloatBuffer padding()
FloatBuffer view of the padding field.public float padding(int index)
padding field.public int direction()
direction field.public boolean didUseLegacyFlag()
didUseLegacyFlag field.public boolean doesLegacyStretchFlagAffectsLayout()
doesLegacyStretchFlagAffectsLayout field.public boolean hadOverflow()
hadOverflow field.public int computedFlexBasisGeneration()
computedFlexBasisGeneration field.public YGFloatOptional computedFlexBasis()
YGFloatOptional view of the computedFlexBasis field.public int generationCount()
generationCount field.public int lastOwnerDirection()
lastOwnerDirection field.public int nextCachedMeasurementsIndex()
nextCachedMeasurementsIndex field.public YGCachedMeasurement.Buffer cachedMeasurements()
YGCachedMeasurement.Buffer view of the cachedMeasurements field.public YGCachedMeasurement cachedMeasurements(int index)
YGCachedMeasurement view of the struct at the specified index of the cachedMeasurements field.public java.nio.FloatBuffer measuredDimensions()
FloatBuffer view of the measuredDimensions field.public float measuredDimensions(int index)
measuredDimensions field.public YGCachedMeasurement cachedLayout()
YGCachedMeasurement view of the cachedLayout field.public static YGLayout create(long address)
YGLayout instance for the specified memory address.@Nullable public static YGLayout createSafe(long address)
public static YGLayout.Buffer create(long address, int capacity)
YGLayout.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static YGLayout.Buffer createSafe(long address, int capacity)
public static java.nio.FloatBuffer npositions(long struct)
positions().public static float npositions(long struct,
int index)
positions.public static java.nio.FloatBuffer ndimensions(long struct)
dimensions().public static float ndimensions(long struct,
int index)
dimensions.public static java.nio.FloatBuffer nmargin(long struct)
margin().public static float nmargin(long struct,
int index)
margin.public static java.nio.FloatBuffer nborder(long struct)
border().public static float nborder(long struct,
int index)
border.public static java.nio.FloatBuffer npadding(long struct)
padding().public static float npadding(long struct,
int index)
padding.public static byte nbitfield(long struct)
public static int ndirection(long struct)
direction().public static boolean ndidUseLegacyFlag(long struct)
didUseLegacyFlag().public static boolean ndoesLegacyStretchFlagAffectsLayout(long struct)
doesLegacyStretchFlagAffectsLayout().public static boolean nhadOverflow(long struct)
hadOverflow().public static int ncomputedFlexBasisGeneration(long struct)
computedFlexBasisGeneration().public static YGFloatOptional ncomputedFlexBasis(long struct)
computedFlexBasis().public static int ngenerationCount(long struct)
generationCount().public static int nlastOwnerDirection(long struct)
lastOwnerDirection().public static int nnextCachedMeasurementsIndex(long struct)
nextCachedMeasurementsIndex().public static YGCachedMeasurement.Buffer ncachedMeasurements(long struct)
cachedMeasurements().public static YGCachedMeasurement ncachedMeasurements(long struct, int index)
cachedMeasurements.public static java.nio.FloatBuffer nmeasuredDimensions(long struct)
measuredDimensions().public static float nmeasuredDimensions(long struct,
int index)
measuredDimensions.public static YGCachedMeasurement ncachedLayout(long struct)
cachedLayout().Copyright LWJGL. All Rights Reserved. License terms.