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.StructUnstable/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;YGFloatOptionalcomputedFlexBasis; uint32_t generationCount; YGDirection lastOwnerDirection; uint32_t nextCachedMeasurementsIndex;YGCachedMeasurementcachedMeasurements[16]; float measuredDimensions[2];YGCachedMeasurementcachedLayout; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classYGLayout.BufferAn array ofYGLayoutstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intBORDER
CACHEDLAYOUT
CACHEDMEASUREMENTS
COMPUTEDFLEXBASIS
COMPUTEDFLEXBASISGENERATION
DIMENSIONS
FLAGS
GENERATIONCOUNT
LASTOWNERDIRECTION
MARGIN
MEASUREDDIMENSIONS
NEXTCACHEDMEASUREMENTSINDEX
PADDING
POSITIONSThe struct member offsets.static intSIZEOFThe struct size in bytes.
-
Constructor Summary
Constructors Constructor Description YGLayout(java.nio.ByteBuffer container)Creates aYGLayoutinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.FloatBufferborder()floatborder(int index)YGCachedMeasurementcachedLayout()YGCachedMeasurement.BuffercachedMeasurements()YGCachedMeasurementcachedMeasurements(int index)YGFloatOptionalcomputedFlexBasis()intcomputedFlexBasisGeneration()static YGLayoutcreate(long address)Returns a newYGLayoutinstance for the specified memory address.static YGLayout.Buffercreate(long address, int capacity)Create aYGLayout.Bufferinstance at the specified memory.static YGLayoutcreateSafe(long address)static YGLayout.BuffercreateSafe(long address, int capacity)booleandidUseLegacyFlag()java.nio.FloatBufferdimensions()floatdimensions(int index)intdirection()booleandoesLegacyStretchFlagAffectsLayout()intgenerationCount()booleanhadOverflow()intlastOwnerDirection()java.nio.FloatBuffermargin()floatmargin(int index)java.nio.FloatBuffermeasuredDimensions()floatmeasuredDimensions(int index)static java.nio.FloatBuffernborder(long struct)Unsafe version ofborder().static floatnborder(long struct, int index)Unsafe version ofborder.static YGCachedMeasurementncachedLayout(long struct)Unsafe version ofcachedLayout().static YGCachedMeasurement.BufferncachedMeasurements(long struct)Unsafe version ofcachedMeasurements().static YGCachedMeasurementncachedMeasurements(long struct, int index)Unsafe version ofcachedMeasurements.static YGFloatOptionalncomputedFlexBasis(long struct)Unsafe version ofcomputedFlexBasis().static intncomputedFlexBasisGeneration(long struct)Unsafe version ofcomputedFlexBasisGeneration().static booleanndidUseLegacyFlag(long struct)Unsafe version ofdidUseLegacyFlag().static java.nio.FloatBufferndimensions(long struct)Unsafe version ofdimensions().static floatndimensions(long struct, int index)Unsafe version ofdimensions.static intndirection(long struct)Unsafe version ofdirection().static booleanndoesLegacyStretchFlagAffectsLayout(long struct)Unsafe version ofdoesLegacyStretchFlagAffectsLayout().intnextCachedMeasurementsIndex()static bytenflags(long struct)static intngenerationCount(long struct)Unsafe version ofgenerationCount().static booleannhadOverflow(long struct)Unsafe version ofhadOverflow().static intnlastOwnerDirection(long struct)Unsafe version oflastOwnerDirection().static java.nio.FloatBuffernmargin(long struct)Unsafe version ofmargin().static floatnmargin(long struct, int index)Unsafe version ofmargin.static java.nio.FloatBuffernmeasuredDimensions(long struct)Unsafe version ofmeasuredDimensions().static floatnmeasuredDimensions(long struct, int index)Unsafe version ofmeasuredDimensions.static intnnextCachedMeasurementsIndex(long struct)Unsafe version ofnextCachedMeasurementsIndex().static java.nio.FloatBuffernpadding(long struct)Unsafe version ofpadding().static floatnpadding(long struct, int index)Unsafe version ofpadding.static java.nio.FloatBuffernpositions(long struct)Unsafe version ofpositions().static floatnpositions(long struct, int index)Unsafe version ofpositions.java.nio.FloatBufferpadding()floatpadding(int index)java.nio.FloatBufferpositions()floatpositions(int index)intsizeof()
-
-
-
Field Detail
-
SIZEOF
The struct size in bytes.
-
ALIGNOF
The struct alignment in bytes.
-
POSITIONS, DIMENSIONS, MARGIN, BORDER, PADDING, FLAGS, COMPUTEDFLEXBASISGENERATION, COMPUTEDFLEXBASIS, GENERATIONCOUNT, LASTOWNERDIRECTION, NEXTCACHEDMEASUREMENTSINDEX, CACHEDMEASUREMENTS, MEASUREDDIMENSIONS, CACHEDLAYOUT
The struct member offsets.
-
-
Constructor Detail
-
YGLayout
public YGLayout(java.nio.ByteBuffer container)
Creates aYGLayoutinstance at the current position of the specifiedByteBuffercontainer. 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:
sizeofin classorg.lwjgl.system.Struct
-
positions
public java.nio.FloatBuffer positions()
- Returns:
- a
FloatBufferview of thepositionsfield.
-
positions
public float positions(int index)
- Returns:
- the value at the specified index of the
positionsfield.
-
dimensions
public java.nio.FloatBuffer dimensions()
- Returns:
- a
FloatBufferview of thedimensionsfield.
-
dimensions
public float dimensions(int index)
- Returns:
- the value at the specified index of the
dimensionsfield.
-
margin
public java.nio.FloatBuffer margin()
- Returns:
- a
FloatBufferview of themarginfield.
-
margin
public float margin(int index)
- Returns:
- the value at the specified index of the
marginfield.
-
border
public java.nio.FloatBuffer border()
- Returns:
- a
FloatBufferview of theborderfield.
-
border
public float border(int index)
- Returns:
- the value at the specified index of the
borderfield.
-
padding
public java.nio.FloatBuffer padding()
- Returns:
- a
FloatBufferview of thepaddingfield.
-
padding
public float padding(int index)
- Returns:
- the value at the specified index of the
paddingfield.
-
direction
public int direction()
- Returns:
- the value of the
directionfield.
-
didUseLegacyFlag
public boolean didUseLegacyFlag()
- Returns:
- the value of the
didUseLegacyFlagfield.
-
doesLegacyStretchFlagAffectsLayout
public boolean doesLegacyStretchFlagAffectsLayout()
- Returns:
- the value of the
doesLegacyStretchFlagAffectsLayoutfield.
-
hadOverflow
public boolean hadOverflow()
- Returns:
- the value of the
hadOverflowfield.
-
computedFlexBasisGeneration
public int computedFlexBasisGeneration()
- Returns:
- the value of the
computedFlexBasisGenerationfield.
-
computedFlexBasis
public YGFloatOptional computedFlexBasis()
- Returns:
- a
YGFloatOptionalview of thecomputedFlexBasisfield.
-
generationCount
public int generationCount()
- Returns:
- the value of the
generationCountfield.
-
lastOwnerDirection
public int lastOwnerDirection()
- Returns:
- the value of the
lastOwnerDirectionfield.
-
nextCachedMeasurementsIndex
public int nextCachedMeasurementsIndex()
- Returns:
- the value of the
nextCachedMeasurementsIndexfield.
-
cachedMeasurements
public YGCachedMeasurement.Buffer cachedMeasurements()
- Returns:
- a
YGCachedMeasurement.Buffer view of thecachedMeasurementsfield.
-
cachedMeasurements
public YGCachedMeasurement cachedMeasurements(int index)
- Returns:
- a
YGCachedMeasurementview of the struct at the specified index of thecachedMeasurementsfield.
-
measuredDimensions
public java.nio.FloatBuffer measuredDimensions()
- Returns:
- a
FloatBufferview of themeasuredDimensionsfield.
-
measuredDimensions
public float measuredDimensions(int index)
- Returns:
- the value at the specified index of the
measuredDimensionsfield.
-
cachedLayout
public YGCachedMeasurement cachedLayout()
- Returns:
- a
YGCachedMeasurementview of thecachedLayoutfield.
-
create
public static YGLayout create(long address)
Returns a newYGLayoutinstance 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.Bufferinstance 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.
-
nflags
public static byte nflags(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().
-
-