Package org.lwjgl.util.yoga
Class YGSize
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.util.yoga.YGSize
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class YGSize extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceLayout
struct YGSize { float width; float height; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classYGSize.BufferAn array ofYGSizestructs.
-
Constructor Summary
Constructors Constructor Description YGSize(java.nio.ByteBuffer container)Creates aYGSizeinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static YGSizecalloc()Returns a newYGSizeinstance allocated withmemCalloc.static YGSize.Buffercalloc(int capacity)Returns a newYGSize.Bufferinstance allocated withmemCalloc.static YGSize.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newYGSize.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static YGSizecalloc(org.lwjgl.system.MemoryStack stack)Returns a newYGSizeinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static YGSizecallocStack()Deprecated.static YGSize.BuffercallocStack(int capacity)Deprecated.static YGSize.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static YGSizecallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static YGSizecreate()Returns a newYGSizeinstance allocated withBufferUtils.static YGSize.Buffercreate(int capacity)Returns a newYGSize.Bufferinstance allocated withBufferUtils.static YGSizecreate(long address)Returns a newYGSizeinstance for the specified memory address.static YGSize.Buffercreate(long address, int capacity)Create aYGSize.Bufferinstance at the specified memory.static YGSizecreateSafe(long address)static YGSize.BuffercreateSafe(long address, int capacity)floatheight()YGSizeheight(float value)Sets the specified value to theheightfield.static YGSizemalloc()Returns a newYGSizeinstance allocated withmemAlloc.static YGSize.Buffermalloc(int capacity)Returns a newYGSize.Bufferinstance allocated withmemAlloc.static YGSize.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newYGSize.Bufferinstance allocated on the specifiedMemoryStack.static YGSizemalloc(org.lwjgl.system.MemoryStack stack)Returns a newYGSizeinstance allocated on the specifiedMemoryStack.static YGSizemallocStack()Deprecated.static YGSize.BuffermallocStack(int capacity)Deprecated.static YGSize.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static YGSizemallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static floatnheight(long struct)Unsafe version ofheight().static voidnheight(long struct, float value)Unsafe version ofheight.static floatnwidth(long struct)Unsafe version ofwidth().static voidnwidth(long struct, float value)Unsafe version ofwidth.YGSizeset(float width, float height)Initializes this struct with the specified values.YGSizeset(YGSize src)Copies the specified struct data to this struct.intsizeof()floatwidth()YGSizewidth(float value)Sets the specified value to thewidthfield.
-
-
-
Constructor Detail
-
YGSize
public YGSize(java.nio.ByteBuffer container)
Creates aYGSizeinstance 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
-
width
public float width()
- Returns:
- the value of the
widthfield.
-
height
public float height()
- Returns:
- the value of the
heightfield.
-
width
public YGSize width(float value)
Sets the specified value to thewidthfield.
-
height
public YGSize height(float value)
Sets the specified value to theheightfield.
-
set
public YGSize set(float width, float height)
Initializes this struct with the specified values.
-
set
public YGSize set(YGSize src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static YGSize malloc()
Returns a newYGSizeinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static YGSize calloc()
Returns a newYGSizeinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static YGSize create()
Returns a newYGSizeinstance allocated withBufferUtils.
-
create
public static YGSize create(long address)
Returns a newYGSizeinstance for the specified memory address.
-
createSafe
@Nullable public static YGSize createSafe(long address)
-
malloc
public static YGSize.Buffer malloc(int capacity)
Returns a newYGSize.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static YGSize.Buffer calloc(int capacity)
Returns a newYGSize.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static YGSize.Buffer create(int capacity)
Returns a newYGSize.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static YGSize.Buffer create(long address, int capacity)
Create aYGSize.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static YGSize.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static YGSize mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static YGSize callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static YGSize mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static YGSize callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static YGSize.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static YGSize.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static YGSize.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static YGSize.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static YGSize malloc(org.lwjgl.system.MemoryStack stack)
Returns a newYGSizeinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static YGSize calloc(org.lwjgl.system.MemoryStack stack)
Returns a newYGSizeinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static YGSize.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newYGSize.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static YGSize.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newYGSize.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nwidth
public static float nwidth(long struct)
Unsafe version ofwidth().
-
nheight
public static float nheight(long struct)
Unsafe version ofheight().
-
nwidth
public static void nwidth(long struct, float value)Unsafe version ofwidth.
-
nheight
public static void nheight(long struct, float value)Unsafe version ofheight.
-
-