Package org.lwjgl.util.yoga
Class YGLayout
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.util.yoga.YGLayout
-
- All Implemented Interfaces:
org.lwjgl.system.Pointer
public class YGLayout extends org.lwjgl.system.Struct
Unstable/private API.Layout
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; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
YGLayout.Buffer
An array ofYGLayout
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
BITFIELD
BORDER
CACHEDLAYOUT
CACHEDMEASUREMENTS
COMPUTEDFLEXBASIS
COMPUTEDFLEXBASISGENERATION
DIMENSIONS
GENERATIONCOUNT
LASTOWNERDIRECTION
MARGIN
MEASUREDDIMENSIONS
NEXTCACHEDMEASUREMENTSINDEX
PADDING
POSITIONSThe struct member offsets.static int
SIZEOF
The struct size in bytes.
-
Constructor Summary
Constructors Constructor Description YGLayout(java.nio.ByteBuffer container)
Creates aYGLayout
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.FloatBuffer
border()
Returns aFloatBuffer
view of theborder
field.float
border(int index)
Returns the value at the specified index of theborder
field.YGCachedMeasurement
cachedLayout()
Returns aYGCachedMeasurement
view of thecachedLayout
field.YGCachedMeasurement.Buffer
cachedMeasurements()
Returns aYGCachedMeasurement
.Buffer view of thecachedMeasurements
field.YGCachedMeasurement
cachedMeasurements(int index)
Returns aYGCachedMeasurement
view of the struct at the specified index of thecachedMeasurements
field.YGFloatOptional
computedFlexBasis()
Returns aYGFloatOptional
view of thecomputedFlexBasis
field.int
computedFlexBasisGeneration()
Returns the value of thecomputedFlexBasisGeneration
field.static YGLayout
create(long address)
Returns a newYGLayout
instance for the specified memory address.static YGLayout.Buffer
create(long address, int capacity)
Create aYGLayout.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 thedidUseLegacyFlag
field.java.nio.FloatBuffer
dimensions()
Returns aFloatBuffer
view of thedimensions
field.float
dimensions(int index)
Returns the value at the specified index of thedimensions
field.int
direction()
Returns the value of thedirection
field.boolean
doesLegacyStretchFlagAffectsLayout()
Returns the value of thedoesLegacyStretchFlagAffectsLayout
field.int
generationCount()
Returns the value of thegenerationCount
field.boolean
hadOverflow()
Returns the value of thehadOverflow
field.int
lastOwnerDirection()
Returns the value of thelastOwnerDirection
field.java.nio.FloatBuffer
margin()
Returns aFloatBuffer
view of themargin
field.float
margin(int index)
Returns the value at the specified index of themargin
field.java.nio.FloatBuffer
measuredDimensions()
Returns aFloatBuffer
view of themeasuredDimensions
field.float
measuredDimensions(int index)
Returns the value at the specified index of themeasuredDimensions
field.static byte
nbitfield(long struct)
static java.nio.FloatBuffer
nborder(long struct)
Unsafe version ofborder()
.static float
nborder(long struct, int index)
Unsafe version ofborder
.static YGCachedMeasurement
ncachedLayout(long struct)
Unsafe version ofcachedLayout()
.static YGCachedMeasurement.Buffer
ncachedMeasurements(long struct)
Unsafe version ofcachedMeasurements()
.static YGCachedMeasurement
ncachedMeasurements(long struct, int index)
Unsafe version ofcachedMeasurements
.static YGFloatOptional
ncomputedFlexBasis(long struct)
Unsafe version ofcomputedFlexBasis()
.static int
ncomputedFlexBasisGeneration(long struct)
Unsafe version ofcomputedFlexBasisGeneration()
.static boolean
ndidUseLegacyFlag(long struct)
Unsafe version ofdidUseLegacyFlag()
.static java.nio.FloatBuffer
ndimensions(long struct)
Unsafe version ofdimensions()
.static float
ndimensions(long struct, int index)
Unsafe version ofdimensions
.static int
ndirection(long struct)
Unsafe version ofdirection()
.static boolean
ndoesLegacyStretchFlagAffectsLayout(long struct)
Unsafe version ofdoesLegacyStretchFlagAffectsLayout()
.int
nextCachedMeasurementsIndex()
Returns the value of thenextCachedMeasurementsIndex
field.static int
ngenerationCount(long struct)
Unsafe version ofgenerationCount()
.static boolean
nhadOverflow(long struct)
Unsafe version ofhadOverflow()
.static int
nlastOwnerDirection(long struct)
Unsafe version oflastOwnerDirection()
.static java.nio.FloatBuffer
nmargin(long struct)
Unsafe version ofmargin()
.static float
nmargin(long struct, int index)
Unsafe version ofmargin
.static java.nio.FloatBuffer
nmeasuredDimensions(long struct)
Unsafe version ofmeasuredDimensions()
.static float
nmeasuredDimensions(long struct, int index)
Unsafe version ofmeasuredDimensions
.static int
nnextCachedMeasurementsIndex(long struct)
Unsafe version ofnextCachedMeasurementsIndex()
.static java.nio.FloatBuffer
npadding(long struct)
Unsafe version ofpadding()
.static float
npadding(long struct, int index)
Unsafe version ofpadding
.static java.nio.FloatBuffer
npositions(long struct)
Unsafe version ofpositions()
.static float
npositions(long struct, int index)
Unsafe version ofpositions
.java.nio.FloatBuffer
padding()
Returns aFloatBuffer
view of thepadding
field.float
padding(int index)
Returns the value at the specified index of thepadding
field.java.nio.FloatBuffer
positions()
Returns aFloatBuffer
view of thepositions
field.float
positions(int index)
Returns the value at the specified index of thepositions
field.int
sizeof()
-
-
-
Field Detail
-
SIZEOF
The struct size in bytes.
-
ALIGNOF
The struct alignment in bytes.
-
POSITIONS, DIMENSIONS, MARGIN, BORDER, PADDING, BITFIELD, COMPUTEDFLEXBASISGENERATION, COMPUTEDFLEXBASIS, GENERATIONCOUNT, LASTOWNERDIRECTION, NEXTCACHEDMEASUREMENTSINDEX, CACHEDMEASUREMENTS, MEASUREDDIMENSIONS, CACHEDLAYOUT
The struct member offsets.
-
-
Constructor Detail
-
YGLayout
public YGLayout(java.nio.ByteBuffer container)
Creates aYGLayout
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
positions
public java.nio.FloatBuffer positions()
Returns aFloatBuffer
view of thepositions
field.
-
positions
public float positions(int index)
Returns the value at the specified index of thepositions
field.
-
dimensions
public java.nio.FloatBuffer dimensions()
Returns aFloatBuffer
view of thedimensions
field.
-
dimensions
public float dimensions(int index)
Returns the value at the specified index of thedimensions
field.
-
margin
public java.nio.FloatBuffer margin()
Returns aFloatBuffer
view of themargin
field.
-
margin
public float margin(int index)
Returns the value at the specified index of themargin
field.
-
border
public java.nio.FloatBuffer border()
Returns aFloatBuffer
view of theborder
field.
-
border
public float border(int index)
Returns the value at the specified index of theborder
field.
-
padding
public java.nio.FloatBuffer padding()
Returns aFloatBuffer
view of thepadding
field.
-
padding
public float padding(int index)
Returns the value at the specified index of thepadding
field.
-
direction
public int direction()
Returns the value of thedirection
field.
-
didUseLegacyFlag
public boolean didUseLegacyFlag()
Returns the value of thedidUseLegacyFlag
field.
-
doesLegacyStretchFlagAffectsLayout
public boolean doesLegacyStretchFlagAffectsLayout()
Returns the value of thedoesLegacyStretchFlagAffectsLayout
field.
-
hadOverflow
public boolean hadOverflow()
Returns the value of thehadOverflow
field.
-
computedFlexBasisGeneration
public int computedFlexBasisGeneration()
Returns the value of thecomputedFlexBasisGeneration
field.
-
computedFlexBasis
public YGFloatOptional computedFlexBasis()
Returns aYGFloatOptional
view of thecomputedFlexBasis
field.
-
generationCount
public int generationCount()
Returns the value of thegenerationCount
field.
-
lastOwnerDirection
public int lastOwnerDirection()
Returns the value of thelastOwnerDirection
field.
-
nextCachedMeasurementsIndex
public int nextCachedMeasurementsIndex()
Returns the value of thenextCachedMeasurementsIndex
field.
-
cachedMeasurements
public YGCachedMeasurement.Buffer cachedMeasurements()
Returns aYGCachedMeasurement
.Buffer view of thecachedMeasurements
field.
-
cachedMeasurements
public YGCachedMeasurement cachedMeasurements(int index)
Returns aYGCachedMeasurement
view of the struct at the specified index of thecachedMeasurements
field.
-
measuredDimensions
public java.nio.FloatBuffer measuredDimensions()
Returns aFloatBuffer
view of themeasuredDimensions
field.
-
measuredDimensions
public float measuredDimensions(int index)
Returns the value at the specified index of themeasuredDimensions
field.
-
cachedLayout
public YGCachedMeasurement cachedLayout()
Returns aYGCachedMeasurement
view of thecachedLayout
field.
-
create
public static YGLayout create(long address)
Returns a newYGLayout
instance for the specified memory address.
-
createSafe
@Nullable public static YGLayout createSafe(long address)
-
create
public static YGLayout.Buffer create(long address, int capacity)
Create aYGLayout.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static YGLayout.Buffer createSafe(long address, int capacity)
-
npositions
public static java.nio.FloatBuffer npositions(long struct)
Unsafe version ofpositions()
.
-
npositions
public static float npositions(long struct, int index)
Unsafe version ofpositions
.
-
ndimensions
public static java.nio.FloatBuffer ndimensions(long struct)
Unsafe version ofdimensions()
.
-
ndimensions
public static float ndimensions(long struct, int index)
Unsafe version ofdimensions
.
-
nmargin
public static java.nio.FloatBuffer nmargin(long struct)
Unsafe version ofmargin()
.
-
nmargin
public static float nmargin(long struct, int index)
Unsafe version ofmargin
.
-
nborder
public static java.nio.FloatBuffer nborder(long struct)
Unsafe version ofborder()
.
-
nborder
public static float nborder(long struct, int index)
Unsafe version ofborder
.
-
npadding
public static java.nio.FloatBuffer npadding(long struct)
Unsafe version ofpadding()
.
-
npadding
public static float npadding(long struct, int index)
Unsafe version ofpadding
.
-
nbitfield
public static byte nbitfield(long struct)
-
ndirection
public static int ndirection(long struct)
Unsafe version ofdirection()
.
-
ndidUseLegacyFlag
public static boolean ndidUseLegacyFlag(long struct)
Unsafe version ofdidUseLegacyFlag()
.
-
ndoesLegacyStretchFlagAffectsLayout
public static boolean ndoesLegacyStretchFlagAffectsLayout(long struct)
Unsafe version ofdoesLegacyStretchFlagAffectsLayout()
.
-
nhadOverflow
public static boolean nhadOverflow(long struct)
Unsafe version ofhadOverflow()
.
-
ncomputedFlexBasisGeneration
public static int ncomputedFlexBasisGeneration(long struct)
Unsafe version ofcomputedFlexBasisGeneration()
.
-
ncomputedFlexBasis
public static YGFloatOptional ncomputedFlexBasis(long struct)
Unsafe version ofcomputedFlexBasis()
.
-
ngenerationCount
public static int ngenerationCount(long struct)
Unsafe version ofgenerationCount()
.
-
nlastOwnerDirection
public static int nlastOwnerDirection(long struct)
Unsafe version oflastOwnerDirection()
.
-
nnextCachedMeasurementsIndex
public static int nnextCachedMeasurementsIndex(long struct)
Unsafe version ofnextCachedMeasurementsIndex()
.
-
ncachedMeasurements
public static YGCachedMeasurement.Buffer ncachedMeasurements(long struct)
Unsafe version ofcachedMeasurements()
.
-
ncachedMeasurements
public static YGCachedMeasurement ncachedMeasurements(long struct, int index)
Unsafe version ofcachedMeasurements
.
-
nmeasuredDimensions
public static java.nio.FloatBuffer nmeasuredDimensions(long struct)
Unsafe version ofmeasuredDimensions()
.
-
nmeasuredDimensions
public static float nmeasuredDimensions(long struct, int index)
Unsafe version ofmeasuredDimensions
.
-
ncachedLayout
public static YGCachedMeasurement ncachedLayout(long struct)
Unsafe version ofcachedLayout()
.
-
-