public class YGSize
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
struct YGSize {
float width;
float height;
}| Modifier and Type | Class and Description |
|---|---|
static class |
YGSize.Buffer
An array of
YGSize structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
HEIGHT
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
WIDTH
The struct member offsets.
|
| Constructor and Description |
|---|
YGSize(java.nio.ByteBuffer container)
Creates a
YGSize instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static YGSize |
calloc()
Returns a new
YGSize instance allocated with memCalloc. |
static YGSize.Buffer |
calloc(int capacity)
Returns a new
YGSize.Buffer instance allocated with memCalloc. |
static YGSize |
callocStack()
Returns a new
YGSize instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static YGSize.Buffer |
callocStack(int capacity)
Returns a new
YGSize.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static YGSize.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
YGSize.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static YGSize |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
YGSize instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static YGSize |
create()
Returns a new
YGSize instance allocated with BufferUtils. |
static YGSize.Buffer |
create(int capacity)
Returns a new
YGSize.Buffer instance allocated with BufferUtils. |
static YGSize |
create(long address)
Returns a new
YGSize instance for the specified memory address. |
static YGSize.Buffer |
create(long address,
int capacity)
Create a
YGSize.Buffer instance at the specified memory. |
static YGSize |
createSafe(long address)
|
static YGSize.Buffer |
createSafe(long address,
int capacity)
|
float |
height()
Returns the value of the
height field. |
YGSize |
height(float value)
Sets the specified value to the
height field. |
static YGSize |
malloc()
Returns a new
YGSize instance allocated with memAlloc. |
static YGSize.Buffer |
malloc(int capacity)
Returns a new
YGSize.Buffer instance allocated with memAlloc. |
static YGSize |
mallocStack()
Returns a new
YGSize instance allocated on the thread-local MemoryStack. |
static YGSize.Buffer |
mallocStack(int capacity)
Returns a new
YGSize.Buffer instance allocated on the thread-local MemoryStack. |
static YGSize.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
YGSize.Buffer instance allocated on the specified MemoryStack. |
static YGSize |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
YGSize instance allocated on the specified MemoryStack. |
static float |
nheight(long struct)
Unsafe version of
height(). |
static void |
nheight(long struct,
float value)
Unsafe version of
height. |
static float |
nwidth(long struct)
Unsafe version of
width(). |
static void |
nwidth(long struct,
float value)
Unsafe version of
width. |
YGSize |
set(float width,
float height)
Initializes this struct with the specified values.
|
YGSize |
set(YGSize src)
Copies the specified struct data to this struct.
|
int |
sizeof() |
float |
width()
Returns the value of the
width field. |
YGSize |
width(float value)
Sets the specified value to the
width field. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int WIDTH
public static final int HEIGHT
public YGSize(java.nio.ByteBuffer container)
YGSize 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 float width()
width field.public float height()
height field.public YGSize width(float value)
width field.public YGSize height(float value)
height field.public YGSize set(float width, float height)
public YGSize set(YGSize src)
src - the source structpublic static YGSize malloc()
YGSize instance allocated with memAlloc. The instance must be explicitly freed.public static YGSize calloc()
YGSize instance allocated with memCalloc. The instance must be explicitly freed.public static YGSize create()
YGSize instance allocated with BufferUtils.public static YGSize create(long address)
YGSize instance for the specified memory address.@Nullable public static YGSize createSafe(long address)
public static YGSize.Buffer malloc(int capacity)
YGSize.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static YGSize.Buffer calloc(int capacity)
YGSize.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static YGSize.Buffer create(int capacity)
YGSize.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static YGSize.Buffer create(long address, int capacity)
YGSize.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static YGSize.Buffer createSafe(long address, int capacity)
public static YGSize mallocStack()
YGSize instance allocated on the thread-local MemoryStack.public static YGSize callocStack()
YGSize instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static YGSize mallocStack(org.lwjgl.system.MemoryStack stack)
YGSize instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static YGSize callocStack(org.lwjgl.system.MemoryStack stack)
YGSize instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static YGSize.Buffer mallocStack(int capacity)
YGSize.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static YGSize.Buffer callocStack(int capacity)
YGSize.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static YGSize.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
YGSize.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static YGSize.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
YGSize.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacitypublic static float nwidth(long struct)
width().public static float nheight(long struct)
height().public static void nwidth(long struct,
float value)
width.public static void nheight(long struct,
float value)
height.Copyright LWJGL. All Rights Reserved. License terms.