Package org.lwjgl.util.yoga
Class YGCachedMeasurement
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.util.yoga.YGCachedMeasurement
-
- All Implemented Interfaces:
org.lwjgl.system.Pointer
public class YGCachedMeasurement extends org.lwjgl.system.StructUnstable/private API.Layout
struct YGCachedMeasurement { float availableWidth; float availableHeight; YGMeasureMode widthMeasureMode; YGMeasureMode heightMeasureMode; float computedWidth; float computedHeight; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classYGCachedMeasurement.BufferAn array ofYGCachedMeasurementstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intAVAILABLEHEIGHT
AVAILABLEWIDTH
COMPUTEDHEIGHT
COMPUTEDWIDTH
HEIGHTMEASUREMODEThe struct member offsets.static intSIZEOFThe struct size in bytes.static intWIDTHMEASUREMODEThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description YGCachedMeasurement(java.nio.ByteBuffer container)Creates aYGCachedMeasurementinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description floatavailableHeight()floatavailableWidth()floatcomputedHeight()floatcomputedWidth()static YGCachedMeasurementcreate(long address)Returns a newYGCachedMeasurementinstance for the specified memory address.static YGCachedMeasurement.Buffercreate(long address, int capacity)Create aYGCachedMeasurement.Bufferinstance at the specified memory.static YGCachedMeasurementcreateSafe(long address)static YGCachedMeasurement.BuffercreateSafe(long address, int capacity)intheightMeasureMode()static floatnavailableHeight(long struct)Unsafe version ofavailableHeight().static floatnavailableWidth(long struct)Unsafe version ofavailableWidth().static floatncomputedHeight(long struct)Unsafe version ofcomputedHeight().static floatncomputedWidth(long struct)Unsafe version ofcomputedWidth().static intnheightMeasureMode(long struct)Unsafe version ofheightMeasureMode().static intnwidthMeasureMode(long struct)Unsafe version ofwidthMeasureMode().intsizeof()intwidthMeasureMode()
-
-
-
Constructor Detail
-
YGCachedMeasurement
public YGCachedMeasurement(java.nio.ByteBuffer container)
Creates aYGCachedMeasurementinstance 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
-
availableWidth
public float availableWidth()
- Returns:
- the value of the
availableWidthfield.
-
availableHeight
public float availableHeight()
- Returns:
- the value of the
availableHeightfield.
-
widthMeasureMode
public int widthMeasureMode()
- Returns:
- the value of the
widthMeasureModefield.
-
heightMeasureMode
public int heightMeasureMode()
- Returns:
- the value of the
heightMeasureModefield.
-
computedWidth
public float computedWidth()
- Returns:
- the value of the
computedWidthfield.
-
computedHeight
public float computedHeight()
- Returns:
- the value of the
computedHeightfield.
-
create
public static YGCachedMeasurement create(long address)
Returns a newYGCachedMeasurementinstance for the specified memory address.
-
createSafe
@Nullable public static YGCachedMeasurement createSafe(long address)
-
create
public static YGCachedMeasurement.Buffer create(long address, int capacity)
Create aYGCachedMeasurement.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static YGCachedMeasurement.Buffer createSafe(long address, int capacity)
-
navailableWidth
public static float navailableWidth(long struct)
Unsafe version ofavailableWidth().
-
navailableHeight
public static float navailableHeight(long struct)
Unsafe version ofavailableHeight().
-
nwidthMeasureMode
public static int nwidthMeasureMode(long struct)
Unsafe version ofwidthMeasureMode().
-
nheightMeasureMode
public static int nheightMeasureMode(long struct)
Unsafe version ofheightMeasureMode().
-
ncomputedWidth
public static float ncomputedWidth(long struct)
Unsafe version ofcomputedWidth().
-
ncomputedHeight
public static float ncomputedHeight(long struct)
Unsafe version ofcomputedHeight().
-
-