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